Skip to content

Conversation

@stuk88
Copy link

@stuk88 stuk88 commented Dec 6, 2024

Until now it was sails generate model Cart user:string And no way to pass assosiations.
Now you can put the assosiated object in array brackets and it generates model with assosiations.
New way:
sails generate model Cart user:[User]
and it will generate

user: {
model: 'user'
}

sails generate model Cart users:[User]
and it will generate

user: {
collection: 'user'
}

add support for collection attribute (Assosiations)
Update attribute.template on generate model
@stuk88
Copy link
Author

stuk88 commented Dec 6, 2024

dont know about the whitespace... need to test.

add support for single model assosiation
@stuk88
Copy link
Author

stuk88 commented Dec 6, 2024

Added support for one to one and many to many assosiation.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant