Reconsider the livecycle of your object. For example:
Dog dog = new Dog("Tom");
| <do magic here>
| assert dog instanceof SpottedDog : "magic failed";
I can't think of any magic that won't fail.
So you only solution is to make the SpottedDog an one on one association with
Dog.
The code will then be some like:
@Entity
| public class SpottedDog {
| @Id Long id;
|
| @OneToOne @PrimaryKeyColumnJoin
| Dog dog;
| }
You may need to fully specify the one to one relationship as it may be an one
way association.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048639#4048639
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048639
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user