Hi Matt,

On 8 Sep 2007 at 3:08, Matt Raible wrote:

> Yeah, negative keys is probably the way to go. Maybe we should have a
> "dev" and "prod" profile in pom.xml. For "dev", sample-data.xml (or
> test-data.xml) would be used (with negative keys). For production, a
> default-data.xml would be used. This would have default values - for
> example, an admin user and the default roles. Thoughts?

I think that's a good solution.  Simple and presumably relatively easy to 
implement.  It also encourages separation of test data from production data.

> On 9/8/07, Rob Hills <[EMAIL PROTECTED]> wrote:
> > Hi Matt,
> >
> > On 8 Sep 2007 at 2:35, Matt Raible wrote:
> >
> > Maybe I'm misunderstanding the problem, but it seems to me that this
> > problem should affect all Databases - some data is inserted into tables
> > without updating the primary key generating system so if any of the keys in
> > your inserted data are less than the value in the primary key generating
> > system (hibernate_sequence in our case), you get a duplicate key error.
> >
> > Since this seems to be a test-data problem I believe that's where the
> > solution should be located - ideally there'd be a way of updating the
> > sequence using an appropriate entry in the sample-data.xml file.  I had a 
> > bit
> > of a scout around the DBUnit docco but unfortunately didn't see anything
> > that looked like an obvious candidate :-(
> >
> > Is there a way of putting something into the relevant part of the pom.xml 
> > that
> > executes a HQL statement or something like that?
> >
> > Meanwhile, I think I'll use the negative id idea mentioned in the discussion
> > following the JIRA entry: http://issues.appfuse.org/browse/APF-718

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]

Reply via email to