-->
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: .class property does not function in polimorphic queries
PostPosted: Thu Jul 01, 2004 4:24 pm 
Beginner
Beginner

Joined: Wed Jan 21, 2004 10:52 pm
Posts: 27
Location: Santa Cruz do Sul - RS - Brazil
Hi all,
I have one class "Element" and 2 joined classes "System" and "Frame" that are, obviously, specializations.
Thus, I try to execute a simple select, like this:
Code:
from Element e where e.class = System

But it does not return nothing!

My model is:
Code:
        +-----------------+
        |                 |
        |n elements       |n permissions
     Element          Permission
         A
         |
         | <<joined>>
         |
   +-----+-----+
   |           |
  System     Frame
  |1 system    |n frames
  |            |
  +------------+


I need to select all elements that are "systems" from association between Permission and Element.
I try this, but it does not function:
Code:
select e from Permission p join p.elements e where e.class = System


Thanks for all.

_________________
Do you still create DTO factories? Oh, no!
Try DTOptimzier now!
https://dtoptimizer.dev.java.net/


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 02, 2004 1:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Are your classes in packages? I don't think class names specified in the where clause look at the auto-imported class names. Use the FQN of the class System.


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.