-
Notifications
You must be signed in to change notification settings - Fork 440
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
Factory sequences, traits, lazy #27
Comments
One pattern we use a lot is a belongs-to relationship that defaults to the first one in the DB: foo_id: Mirage.lazy((db) => {
return db.foos.firstOrCreate().id;
}) |
Would this support something like
(Take it as pseudo code.. I am on a mobile phone!) |
@jamesarosen interesting... I think an @mellatone yes, actually this is possible as soon as this PR lands, which is backwards compatible so there's nothing blocking it. |
#269 closes dynamic |
closing as sequences/lazy are done. Follow #852 to track traits |
The API for sequences is changing to be consistent with upcoming traits, dynamic attrs and associations.
The text was updated successfully, but these errors were encountered: