-->
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.  [ 1 post ] 
Author Message
 Post subject: query returns nothing if discriminator values string or char
PostPosted: Tue Jan 09, 2007 3:35 am 
Newbie

Joined: Fri Sep 29, 2006 10:52 am
Posts: 6
Hi all,

Hibernate version:
3.0

Mapping documents:

Code:
<discriminator column="type" type="string"/>
...
<subclass name="Org" discriminator-value="E">
  <property name="property" type="string" length="128"/>
</subclass>


Name and version of the database you are using:
postgresql

I am trying to load all entities of type Org. For some reason it does not work if I use strings or characters for the discriminator. It only returns values if I change the above mapping to
Code:
<discriminator column="type" type="integer"/>
...
<subclass name="Org" discriminator-value="1">
  <property name="property" type="string" length="128"/>
</subclass>

I am using the Criterion to build the query. It is via a join on which i put a restriction "class" must be Org.

Any suggestions will be appreciated.

Thanks


[/code]


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

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.