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]