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
totalAmount can be generated first then it could be used to generate orderItems members, or,
orderItems could be generated and then totalAmount field could be updated by summing orderItem.amount fields
Can ObjectGeneratorBuilder be extended to include the ability to use generated fields of the about-to-be-generated object? Maybe through using lambdas?
The text was updated successfully, but these errors were encountered:
Thanks @keremulutas , this is really interesting problem and use case is pretty common. I'll try to come up with some idea how to implement this in next week.
I don't know if it's feasible or even logical to try doing such a thing, but here is the situation.
Consider generating an
Order
class withOrderItems
- requirements are:List<OrderItems> orderItems
that can have max X items, min Y itemdouble totalAmount
field - as you can guess, this field is equal to the sum of sub-amounts of orderItems membersFirst step would be added if #175 is implemented.
For the second requirement,
totalAmount
can be generated first then it could be used to generateorderItems
members, or,orderItems
could be generated and thentotalAmount
field could be updated by summingorderItem.amount
fieldsCan ObjectGeneratorBuilder be extended to include the ability to use generated fields of the about-to-be-generated object? Maybe through using lambdas?
The text was updated successfully, but these errors were encountered: