Skip to content

findOrCreate without id #355

@SamuelTilly

Description

@SamuelTilly

I am unable to make findOrCreate work without knowing the model id on beforehand.

Entity.findOrCreate({slug: params.urlSlug}, {create: false})

Then i would need to create a new model but as soon as i make a fetch and it retrieve it's data it will give me the "Cannot instantiate more than one Backbone.RelationalModel" error.

if i specify id it works tho:

Entity.findOrCreate({id: 1, slug: params.urlSlug}, {create: false})

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