This week's giveaway is in the
We're giving away four copies of
video training course and have Ken Kousen on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Object Relational Mapping
Help in HQL
Joined: Mar 07, 2009
Mar 07, 2009 03:15:00
I am having difficulty creating an HQL statement. The following code is working
ICriteria criteria = session.CreateCriteria(typeof
but when I want to code the same in HQL I get an error "could not
resolve property: items of:". The hql is given below
sql = "from Organization as o join fetch
o.Addresses a join fetch a.items x where x.State like 'U%'";
IQuery query = session.CreateQuery(sql);
The mapping I am using is as follows
<class name="Organization" table="Organization" lazy="false">
<id name="OrganizationID" column="OrganizationID" type="int">
<property name="OrganizationName" column="OrganizationName"
<bag name="items" table="OrgAddressMap" lazy="false" cascade
<many-to-many class="Address" column="AddressID"/>
What is wrong with the HQL statement?
subject: Help in HQL
HBM mapping Problem
restrict queries in association while fetching data....
Hibernate - Object Graph using outer join
Hibernate generating queries with duplicate columns
fetch="subselect" and fetch="join" not working as expected with HQL
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015