Skip to content

Problem with multidatabase application. #17

@Kuzdo

Description

@Kuzdo

Hi!

I have problem when in one Action I'm using few DBs. One DB I have set as default (active) in main.php, in Model I have specified getCollection method with second DB. And now the best: application counts records from good (second) DB, but is trying retrieving records from default DB:

2016-12-29T12:29:00.071+0100 I COMMAND  [conn1] command db2.$cmd command: count { count: "some_collection", limit: 0, skip: 0 } planSummary: COUNT ntoreturn:1 keyUpdates:0 writeConflicts:0 numYields:0 reslen:44 locks:{ Global: { acquireCount: { r: 2 } }, MMAPV1Journal: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { R: 1 } } } 0ms
2016-12-29T12:29:00.074+0100 I QUERY    [conn1] query db1.some_collection query: { $query: {}, $orderby: { _id: 1 } } planSummary: EOF ntoreturn:20 ntoskip:0 nscanned:0 nscannedObjects:0 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:0 reslen:20 locks:{ Global: { acquireCount: { r: 2 } }, MMAPV1Journal: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { R: 1 } } } 0ms

@Sammaye , can you check why this happens?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions