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

Assign foreign key value when creating a row #791

Open
markusstephanides opened this issue Jun 17, 2017 · 0 comments
Open

Assign foreign key value when creating a row #791

markusstephanides opened this issue Jun 17, 2017 · 0 comments

Comments

@markusstephanides
Copy link

markusstephanides commented Jun 17, 2017

Hi.

I have a Session table and a User table. The Session table has a foreign referencing the primary key (id) of the User. Now I want to create a new Session for a user:

db.Session.create({
token: hash,
user: user.id,
created: new Date()}, cb);

But the user column doesn't get set in the resulting SQL statement. Why?

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

1 participant