dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 379 forks source link

Ensure hasMany() associations work when properties have mapsTo #679

Closed stueynz closed 8 years ago

stueynz commented 8 years ago

Another bug fix when using mapsTo on PK properties. We have to adjust PK property names to matching database name (using mapsTo field in property definition) when setting up JOIN for Many association.

Otherwise the ON part of the JOIN clause will have the property name instead of the database field name when doing the select.

dxg commented 8 years ago

Awesome, thanks!

dxg commented 8 years ago

Released 2.1.28 with this changed.