-->
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: Can someone explain when to use DISCRIMINATOR tag to me?
PostPosted: Sun Oct 29, 2006 3:03 pm 
Newbie

Joined: Tue Oct 17, 2006 10:57 am
Posts: 14
I tried searching for a simple explanation but couldnt find it. When to use DISCRIMINATOR and when to use SUBCLASS?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 29, 2006 4:05 pm 
Beginner
Beginner

Joined: Tue Sep 26, 2006 11:46 pm
Posts: 33
I assume you're talking about XML mapping files rather than annotations.

The discriminator is the column used to determine which subclass a row represents when using table-per-class-hierarchy inheritance mapping. The <discriminator> element specifies the details of this column (name, data type etc).

http://hibernate.org/hib_docs/reference ... criminator

The subclass element is used to specify the actual subclasses that are stored. You can specify the discriminator-value attribute for each <class> and <subclass> element to determine what value in the discriminator column hibernate will interpret as meaning that class.

http://hibernate.org/hib_docs/reference ... n-subclass


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.