I think there is a conceptual issue here. What you are trying is analogous to 
casting a Dog object to a SpottedDog object, which is bad--a Dog is not always 
a SpottedDog.

I suggest you remove the existing Dog object, then save the SpottedDog object. 

For example:
Dog d = em.find(Dog.class, ID);
  | SpottedDog sd = new SpottedDog(d);
  | sd.set*(...);
  | ...
  | em.remove(d);
  | em.persist(sd); //you could also use em.merge(sd) here


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049360#4049360

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049360
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to