Adding support for multiple tables with same name across different databases#30
Adding support for multiple tables with same name across different databases#30dasilva333 wants to merge 1 commit intobalderdashy:masterfrom
Conversation
…different databases.
|
Can you document how this feature would work? |
|
It seems there is an issue with waterline/sails-mysql/waterline-sequel to reproduce the problem try the following steps:
The solution I came up with might not be the ideal solution because it required me to assign an identity property to every model before I load it like this: modelObject.identity = modelObject.connection.toLowerCase()+"_"+modelObject.tableName.toLowerCase(); and then later to: orm.loadCollection(Waterline.Collection.extend(modelObject)); Basically I'm submitting my solution but also suggesting someone else look further into this simple and reproducible problem with the code. |
|
Also of note this ticket was also reported elsewhere on the parent project: |
|
As reported on the parent project, adding an identity « works » great, but fail on populate. |
Also as part of the change this need to be included as well:
dasilva333/sails-mysql@ae67aed