You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have a nested class structure (like in your basic_example, with Product beeing a child field of Order), I'm a bit surprised that generated code for changeable and buildable doesn't handle that :
_OrderChanges.product is of type Product and not _ProductChanges
OrderBuilder.product is of type Product and not ProductOrder (however this makes more sense as Product is NOT buildable)
I have a lot of nested classes like that, so this limitation makes the whole generated code a lot less usefull unfortunately.
Maybe we can add an extra parameter for this ?
The text was updated successfully, but these errors were encountered:
Nico04
changed the title
Handle Changeable/Buildable child fields
Handle Changeable/Buildable child fields (nested classes)
Nov 28, 2024
It would require more generated code and the performance would decrease both for the generator and the running code. Let's say that I almost never clone/change/rebuild a class. Do you have this need very often?
I'm also waiting for the metadata to arrive in stable so I can retire the build_runner. Sorry but I don't think I have any plans to support this
When you have a nested class structure (like in your basic_example, with Product beeing a child field of Order), I'm a bit surprised that generated code for changeable and buildable doesn't handle that :
I have a lot of nested classes like that, so this limitation makes the whole generated code a lot less usefull unfortunately.
Maybe we can add an extra parameter for this ?
The text was updated successfully, but these errors were encountered: