Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property name and database column name mapping support request. #273

Closed
taoyuan opened this issue Aug 2, 2013 · 1 comment
Closed

Property name and database column name mapping support request. #273

taoyuan opened this issue Aug 2, 2013 · 1 comment

Comments

@taoyuan
Copy link

taoyuan commented Aug 2, 2013

Request to support model property name to database column name mapping. Like this:

var User = orm.define('User', {
    userAccessToken: { type: 'string', column: 'token' }
    lastLogin: String
}, {
...
});

The userAccessToken map to database column token, lastLogin auto(or options enable this) map to database column last_login.

kapouer added a commit to kapouer/node-orm2 that referenced this issue Nov 6, 2013
This is a generic way to address
dresende#273
Important: property.select can be a function, whose
return value won't be escaped.
kapouer added a commit to kapouer/node-orm2 that referenced this issue Dec 28, 2013
This is a generic way to address
dresende#273
Important: property.select can be a function, whose
return value won't be escaped.
dxg pushed a commit that referenced this issue Apr 7, 2014
This is a generic way to address
#273
Important: property.select can be a function, whose
return value won't be escaped.
dxg pushed a commit that referenced this issue May 7, 2014
This is a generic way to address
#273
Important: property.select can be a function, whose
return value won't be escaped.
@dxg
Copy link
Collaborator

dxg commented May 7, 2014

This should now be possible in master.
See the wiki for details.
A new official version will be released in the near future.

@dxg dxg closed this as completed May 7, 2014
dxg added a commit that referenced this issue May 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants