-->
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.  [ 3 posts ] 
Author Message
 Post subject: HQL Help...
PostPosted: Fri Jul 28, 2006 10:31 am 
Regular
Regular

Joined: Sun Feb 12, 2006 10:18 pm
Posts: 60
Location: Rosario, Argentina
first, is there any info about HQL in the NHibernate's Docs? I couldn't find it, am I looking in he wrong place? this is the site I'm cheking for help:

http://wiki.nhibernate.org/display/NH/Documentation

Now, for the question: I'm trying to use HQL for the first time. It seems pretty simple, but I tried this:

"FROM Users AS u WHERE u.email = :email and u.id != :id"

and it threw this Exception

"unexpected token: as [FROM Usuarios AS u WHERE u.email = :email and u.id != :id]"

so I removed the "AS", although Hibernate's Doc says it's optional. I tried it again, and the new exception says

"in expected: u [FROM Usuarios u WHERE u.email = :email and u.id != :id]"

So where's the error??


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 28, 2006 12:52 pm 
Expert
Expert

Joined: Fri May 13, 2005 5:56 pm
Posts: 308
Location: Santa Barbara, California, USA
well things look right from here. have you tried replacing the "!=" with "<>" we are on the Microsoft Platform. i'm totally guessing here...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 28, 2006 4:01 pm 
Regular
Regular

Joined: Sun Feb 12, 2006 10:18 pm
Posts: 60
Location: Rosario, Argentina
Never mind... the problem was between the keyboard and the chair... I wrote "Users" in stad of "User"...


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