quick icon indicating copy to clipboard operation
quick copied to clipboard

Update HasOneOrMany Relationship Class to Allow Returning a New Entity

Open homestar9 opened this issue 1 year ago • 2 comments

Being able to create a new HasOneOrMany relationship entity is great, but sometimes you need access to the new entity before persistence. Adding a newEntity() method gives additional flexibility and also plays nicely with other relationship types.

Additionally, being able to call something like prc.post.postCategories().newEntity() is much cleaner than using the current workaround, which is prc.post.postCategories().getRelated().newEntity()

homestar9 avatar Dec 20 '23 19:12 homestar9