Closed ldonnet closed 11 years ago
There should be no limit on the depth of nested mapped fields, I suspect that when the MappedList is being built in the ModelFactory that is is not checking contents of the MappList to see if it matches a Blueprint.
I suspect I know the problem, if the Route model has List<StopPoiints>
set to an empty ArrayList
, the ModelFactory will never override it with the Blueprint since it think the value has already been set. This has bitten me before and should be marked as a bug to be fixed.
...
I created a simple test of nested MappListss that is working with, Car -> Wheel -> Options
Thanks a lot! With your work I can do it :
@MappedList(target = StopPoint.class, size = 6, ignoreEmpty = false)
List<StopPoint> stopPoints;
Hi Michael,
I have searched desesperatly a framework like FactoryGirl in java and I find yours. It's awesome and very cool. I use it for my test now but I have a strange effect when I create MappedList of MappedList.
I have this Line class which call a Route Class which call a StopPoint class. But stopPoints object are not created when I create a line. I've got an empty array. Do you have a limit when we create objects?
Which call an other class