The only thing that stands out is the following line:

locationDao.get(10000L);

Does reducing this number, or changing it to -10L change the behavior?

Matt

On 8/23/07, p7k <[EMAIL PROTECTED]> wrote:
>
> Dear Matt and users,
>
> When you have time, if you have time, take a look at this code
> http://pastebin.com/m70bbcbf4 http://pastebin.com/m70bbcbf4 . I was able to
> blame this UnitTest as the source of my sql sequence issues.
>
> Thank you very much.
>
>
> mraible wrote:
> >
> > The only thing I can think of is to crank up your logging for
> > org.hibernate.SQL in your log4j.xml. Or use some sort of SQL
> > monitoring tool to see if the index is being reset by SQL. Maybe a
> > unit test is resetting it to a higher number?
> >
> > Matt
> >
> > On 8/23/07, p7k <[EMAIL PROTECTED]> wrote:
> >>
> >> 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]
> >>
> >>
> >
> >
> > --
> > 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#a12306044
> 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]

Reply via email to