Hi,

I am using AppFuse 2.0, and generated an application using the appfuse:gen
goal. It works great, except that my *FormControllerTest(s) keep failing for
Model objects which have relations to each other. For example I have 3 model
objects A, B and C. They have properties such as A.B and C.B.

In the peristence tutorial it is mentionned that it is optional for Model
objects to extend BaseObject.
So when I designed by model objects I didn't extend BaseObject. The problem
is in the use of
BaseControllerTestCase.objectToRequestParameters in some of the generated
tests. The child properties A.B or C.B are not copied to the request
properly. That's because BaseControllerTestCase.objectToRequestParameters
check if a property is an instance of BaseObject and recursivley copies the
child object to the request if it is.

In my case I simply made my object extend BaseObject and that took care of
the problem. It's just that the tutorial note
(http://appfuse.org/display/APF/Persistence) is misleading in this
particular context.
Maybe using a simple interface (org.appfuse.model.Model) to "mark" model
object could do the trick?

Thanks,

Florian
-- 
View this message in context: 
http://www.nabble.com/objectToRequestParameters.BaseControllerTestCase-fails-for-non-BaseObject-models-tf4556930s2369.html#a13005064
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to