Skip to content

Objects to be embedded getting saved to the database #10

@SFEley

Description

@SFEley

Doing this:

u = User.new
p = Payment.embed
p.date = Time.now
p.amount = 5.00
u.payment = p

...results in a Payment collection being made and the Payment record going into it, where it will hang around as a duplicate of the one the User has.

This is not right, and it's what the .embed method was supposed to be for. Make sure initializing with that method never saves anything to the DB.

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