-->
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.  [ 4 posts ] 
Author Message
 Post subject: Some objects for same field
PostPosted: Wed Jan 16, 2008 3:22 pm 
Newbie

Joined: Mon Dec 10, 2007 9:17 am
Posts: 3
hi

I have a table that have the fields: objectId(integer) and ObjectType(integer).

I would like to make a many-to-one relation using the ObjectType.

Example:
if the ObjectType == 1 then the class of relation will be the com.myapplication.Product;
if the ObjectType == 2 then the class of relation will be the com.myapplication.ServiceOrder
if the ObjectType == 3 then the class of relation will be the com.myapplication.Project
...


is it possible?

Thanks!


Last edited by Leinad on Thu Jan 17, 2008 6:11 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 17, 2008 3:18 am 
Newbie

Joined: Tue Aug 28, 2007 3:18 am
Posts: 13
What ever be the value of Object type it seems u r always want make a many -to-one relation with Product. right ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 17, 2008 6:13 am 
Newbie

Joined: Mon Dec 10, 2007 9:17 am
Posts: 3
tamal123 wrote:
What ever be the value of Object type it seems u r always want make a many -to-one relation with Product. right ?


hmmm, no, i posted wrong, i'm sorry, i fix it now.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 17, 2008 7:17 am 
Newbie

Joined: Tue Aug 28, 2007 3:18 am
Posts: 13
I dont know.
But can it be possible from database prespective ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.