Skip to content

Assign foreign key value when creating a row #791

Description

@markusstephanides

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions