This content has been marked as final.
Show 3 replies
-
1. Re: change of subclasse causes error
epbernard Nov 28, 2005 1:48 PM (in response to ruud1)this is not doable in Java (ie to change one class into another one), hence it's not possible in EJB3.
-
2. Re: change of subclasse causes error
ruud1 Nov 30, 2005 2:28 AM (in response to ruud1)i agree, but the problem is not creating the right subclasse in java (done by copying every attribute and/or using a special constructor).
Suppose baseclasse X and subclasse A and B.
I have a persistent object A, i create an object B with the SAME ID in A.
The problem is that i can not persist object B without deleting A first.
If i delete A and persist B in 1 transaction on what moment is the consistency checked by the application server (at the moment of delete of A or at the end of the transaction ?) -
3. Re: change of subclasse causes error
epbernard Dec 30, 2005 3:08 PM (in response to ruud1)I don't really understand your question, but your domain could probably be refactored (and benefit from it) wo using inheritance