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

Doesn't work with belongsTo when non-standard foreign keys are present #61

Closed
Sawtaytoes opened this issue Feb 21, 2016 · 1 comment
Closed

Comments

@Sawtaytoes
Copy link

If I have a DB with a table accounts but in another section, a badly-named foreign key userid tracking back to it, the generator does account for this when making the column reference in the define statement, but if I manually add belongsTo, it does not do this and instead looks for accountId.

Is this something I'm supposed to handle or can the generator do that for me?
Might be similar to #34

steveschmitt added a commit that referenced this issue Nov 3, 2020
) (#369)

Add precision to DECIMAL, DOUBLE, and FLOAT types
Add array types to TypeScript definitions
@steveschmitt
Copy link
Collaborator

Added belongsTo/hasOne/hasMany to the initModels function in release 0.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants