-->
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: asking on mapped values in hql
PostPosted: Sun Oct 29, 2006 10:54 am 
Newbie

Joined: Wed Mar 08, 2006 8:11 am
Posts: 17
Location: Israel
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.1.3

Mapping documents:

Code:
<map name="attributes" table="ATTR" lazy="false"
   sort="unsorted" cascade="none">
   <key column="DEV_ID"></key>
   <index column="ATTR_CODE" type="integer" length="6" />
   <element column="VALUE" type="string" length="15"
      not-null="true" unique="false" />
</map>


Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using: oracle 10g

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

I have the above section in my hbml file - an entity has a map of attributes. I want to get all entities with a certain VALUE and a certain ATTR_CODE in them. Is it at all possible? I managed to ask only on the ATTR_CODE by using the column name in the hql, but I am having some problems using the VALUE column in the same way, as I have a different column of the same name from a different table, in my query. Will making the column name unique fix this problem?


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.