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?