-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Mapping Polymorphic Queries With Annotations
PostPosted: Thu Jan 14, 2010 6:41 pm 
Newbie

Joined: Thu Jan 14, 2010 6:19 pm
Posts: 2
I have a basic skeleton here and I am finding it really tough to map Polymorphic Queries with annotations. Provided that I have a location field in each item type (offence and defence) How would I go about bidirectionally mapping this query, or even unidirectionally for that matter?

I really appreciate any help, mixing all of this together for such an exotic mapping is really tough to figure out. The following is the basic structure which I've got (which i hope is right)

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
interface item {
}

@Entity
@Table("Defence")
class Defence implements Inventoryable, Wearable {
..
}

@Entity
@NamedQuery(name = "ClosetItems", query = 'Select * from Inventoryable where location = "INVENTORY"')
class Inventory implements Location {
....
Set<Inventoryable> getItems() {
}


Top
 Profile  
 
 Post subject: Re: Mapping Polymorphic Queries With Annotations
PostPosted: Fri Jan 15, 2010 1:55 pm 
Newbie

Joined: Thu Jan 14, 2010 6:19 pm
Posts: 2
*bump*


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.