-->
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.  [ 3 posts ] 
Author Message
 Post subject: discriminator in joined-subclass
PostPosted: Wed Nov 16, 2005 8:58 am 
Newbie

Joined: Wed Oct 12, 2005 4:36 am
Posts: 9
Are discriminators allowed to be added in joined-subclasses ?

They are not allowed in joined-subclasses tag "only appears in subclass"..

I have joined subclasses and they are working fine; my problem is when i try to select objects of base class type I get the following exception

{"The maximum number of elements in the select list is 4096 and you have supplied 8942." }

That is because i have lots of objects inheriting from one base class and when nHibernate tries to join them in one select statement the columns count is so high as seen,

so,will the discriminator be helpful in that scenario ?
If so ,, How to use it ??
if not ,, How to tell nhibernate to select only the base class columns and the others after it figures out the type "that is why i wanted to use discriminator column"

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 12:43 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Discriminators would be useless in <joined-subclass>.

In your case, you should probably avoid running queries on the base class... Do it directly on joined-subclasses.

Note that as <joined-subclass>es can be nested, you may divide the base class in many "second-level" base classes.

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 21, 2005 3:26 am 
Newbie

Joined: Wed Oct 12, 2005 4:36 am
Posts: 9
I do not need to select the base class , but the problem I need to add a field that is of type base class,,,

Is it possible to specify a field of base class type and values will be of a subset of the subclasses ? and tell hibernate to select only from these types tables ?


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