Dear Matt and users,
running hibernate3:hbm2ddl and dbunit:operation prior to jetty launch, did
reset my database and i get {1,2,3 ... } ids, as one would expect.
usually, i run mvn clean before checking into svn. afterwards, i run mvn
package or mvn -U , depending on my mood :)
both ways, however, create that weird id situation. i even removed
everything (relevant) from my sample-data.xml. and my tests do receive
normal ids.
where should i start hunting for this problem?
or should i just let it be and reset my db manually every time (that would
suck) ?
p.s. thank you for your usually quick response :)
mraible wrote:
>
> I don't believe this is normal - unless something is resetting your
> index start. If you drop your database and recreate and populate it
> before starting Jetty (mvn hibernate3:hbm2ddl dbunit:operation
> jetty:run-war), does it still do the same thing? Does the same
> behavior happen in your Manager and JSF tests?
>
> Matt
>
> On 8/22/07, p7k <[EMAIL PROTECTED]> wrote:
>>
>> I have a polymorphic BaseLocation class, which is extended by Customer
>> and
>> Depot classes.
>>
>> with hibernate and annotations my setup is something like this:
>>
>> @Entity
>> @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
>> public abstract class BaseLocation extends BaseObject implements
>> Serializable {
>> @Id
>> @GeneratedValue(strategy = GenerationType.TABLE) //TODO: find-out
>> why
>> .TABLE
>> public Long getId() { return id; }
>> ...
>> }
>>
>> @Entity
>> public class Customer extends BaseLocation implements Serializable { ...
>> }
>>
>> @Entity
>> public class Depot extends BaseLocation implements Serializable { ... }
>>
>> The problem is: when I run my BaseLocationDao tests, my persisted objects
>> (with a clean DB) receive normal id's {1,2, ... } , but when I save my
>> objects from the JSF front-end through a BaseLocationManager which uses
>> the
>> same saveOrUpdate() method from BaseLocationDao my persisted objects
>> receive
>> id's in this sequence {32768, 32769, ... }. Why would it do that? Is
>> this
>> normal? Where should I start debugging?
>>
>> Thank you!
>> --
>> View this message in context:
>> http://www.nabble.com/hibernate-InheritanceType.TABLE_PER_CLASS-issue-tf4315486s2369.html#a12287620
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> 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]
>
>
>
--
View this message in context:
http://www.nabble.com/hibernate-InheritanceType.TABLE_PER_CLASS-issue-tf4315486s2369.html#a12289578
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]