Yes, this is probably possible.

You could also try turning off foreign keys on import:

http://raibledesigns.com/rd/entry/dbunit_tip_turn_off_foreign

Matt

On 9/21/07, Rob Hills <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Over the past few days, I've had to run appfuse:gen over my model classes
> numerous times and I've discovered some behaviour I think could be
> improved.
>
> The problem arises when you have dependencies (eg one-to-many).  When
> inserting test data via sample-data.xml, the data needs to be inserted in the
> correct order (ie parent data before child data), or else you get Integrity
> Constraint Violation errors when DBUnit runs.
>
> I suspect it's a bit much to expect appfuse:gen to be able to nut out these
> relationships and sort the sample-data.xml into the correct order.  However,
> it would be nice if it didn't mess up my manual sorting in subsequent runs.
>
> AFAICT, if you run appfuse:gen over a pojo a second or subsequent time,
> when it comes to updating sample-data.xml, it seems to locate the existing
> data for that entity (presumably via the MyPojo-START and MyPojo-END
> comment tags), blat it and then add the new version to the end of the file.
>
> This means I often have to manually re-order the sample-data.xml file
> afterwards.
>
> It would be nice if appfuse:gen could locate the old data, blat everything
> between the xx-START and xx-END comments, but leave the comments in
> place and then insert the new data between them, hence preserving the
> original ordering.  Is that possible?
>
> Cheers,
> Rob Hills
> Waikiki, Western Australia
> Mobile +61 (412) 904-357
> Fax: +61 (8) 9529-2137
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
http://raibledesigns.com

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

Reply via email to