hi everyone, I've a problem with hibernate and I'm going crazy. I searched the solution on google but i didn't find that, so I'd like to ask you
I'm using the last version of Hibernate with jpa annotation persist my application
I've a class Traveller and a subclass Driver which are mapped on the same table "Traveller" with a discriminator "traveller_type" (which is "dummy" for the superclass and "driver" for the subclass). Now, I've to change the state of the superclass to the subclass: a traveller which is persisted must become a driver and I've to persist that
How can I do it? I tried in a lot of ways, the last one was: - i create a driver object with the traveller datas - i add the specified datas - i try to "saveOrUpdate" the driver but hibernate gives me an exception: "a different object with the same identifier value was already associated with the session"
I tried to merge the object ( "session.merge(driver)" ) but i receive another exception: "org.hibernate.AssertionFailure: null identifier"
can you help me please?
thanks
Alberto
P.S. i forgot: i use postgresql 9.1 as db
|