Skip to content

Why debug info always appears twice for only one sql. #258

Closed

Description

@taoyuan

Using option { protocol: 'pg', ..., query: { debug: true }} when connect to "postgres" database, and execute any involved query operation, the debug info always appears twice with [SQL/postgres] and [SQL/mysql], like this:

[SQL/postgres] SELECT "guid", "guid", "type", "name", "node_id", "user_id" FROM "device" WHERE "user_id" = '9f08007f-9ed9-462c-8076-f13942beec2d'
[SQL/mysql] SELECT "guid", "guid", "type", "name", "node_id", "user_id" FROM "device" WHERE "user_id" = '9f08007f-9ed9-462c-8076-f13942beec2d'

and the primary key appears twice in SELECT clause also.

Activity

  1. MrSwitch commented on Jul 31, 2013

    @MrSwitch

    It could be the same issue, but i get the callback fired twice on save.

  2. dxg commented on Aug 1, 2013

    @dxg
    Collaborator

    I've also seen callbacks [and the save itself] fired twice on models with an association and autoFetch: true. Haven't got around to writing a test case yet.

  3. dresende commented on Aug 2, 2013

    @dresende
    Owner

    I don't think it's the same issue. Can you please check if the debugs now appear only with "sql/postgres" prefix? If you have more information or an example of a duplicated .save()callback call please post.

  4. taoyuan commented on Aug 3, 2013

    @taoyuan
    Author
    1. Yes, "sql/postgres" prefix debugs is ok, only appear once now. But the primary key still appears twice in SELECT clause.
    [SQL/postgres] SELECT "id", "id", "name", "lastActive", "createdAt", "updatedAt", "user_id" FROM "Entity" WHERE "id" = 'AE09F657DABF6EA4' LIMIT 1
    1. The issue about .save() callback call twice did not happen in my environment. Maybe should contact @MrSwitch to check this.
  5. dresende commented on Aug 3, 2013

    @dresende
    Owner

    @MrSwitch do you have an open issue about it? (I can't remember) If not please post a quick example so we can fix it if it still happens. This one about debug lines is done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions