-->
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.  [ 4 posts ] 
Author Message
 Post subject: column ambiguously defined
PostPosted: Tue Oct 19, 2004 1:47 pm 
Newbie

Joined: Mon Jul 05, 2004 8:37 am
Posts: 15
Hibernate version:

2.1

Mapping documents:

<class
name="com.dsicdiiti.tnt.oms.test.TestData"
table="TEST"
dynamic-update="true"
>

<id
name="sysID"
type="java.lang.Long"
column="SYSID"
>
<generator class="com.dsicdiiti.tnt.common.util.HibernateGuidBridge" />
</id>

<many-to-one
name="housingData"
column="SYSID"
class="com.dsicdiiti.tnt.oms.housing.HousingData"
insert="false"
update="false"
>
</many-to-one>

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

Criteria crit = sess.createCriteria(TestData.class);
crit.add(Expression.like("lastName","Test%"));
crit.add(Expression.or(
Expression.isNull("relDate"),
Expression.isNotNull("relStdt")
) );

crit.setFirstResult(0);

crit.setMaxResults(10);

int queryCount = (int)crit.count();
List test = crit.list();

Full stack trace of any exception that occurs:

Name and version of the database you are using:

Oracle9i

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


I'm seeing a strange issue with a criteria search. I have mapped an association to my housing data class and it works fine. However, as soon as I use the setMaxResults method in the Criteria class I get a "column ambiguously defined" error. Any idea what would cause this error on that method?

Thanks,
twufire


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 20, 2004 4:09 pm 
Newbie

Joined: Mon Jul 05, 2004 8:37 am
Posts: 15
I get similar errors when I use the addOrder method in criteria with the setMaxResults method as well.


Top
 Profile  
 
 Post subject: same problem
PostPosted: Sat Oct 23, 2004 9:03 pm 
Newbie

Joined: Fri Oct 22, 2004 12:57 pm
Posts: 1
Location: Uberl
i

_________________
Aline de Castro Oliveira


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 25, 2004 10:42 am 
Expert
Expert

Joined: Sat Jan 17, 2004 2:57 pm
Posts: 329
Location: In the basement in my underwear
twufire, this was a bug that was addressed in a later version of hibernate, search the JIRA or release notes for the particular version.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.