-->
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: accessing static fields of a class in HQL
PostPosted: Wed Sep 01, 2004 12:42 am 
Beginner
Beginner

Joined: Mon May 17, 2004 7:15 am
Posts: 24
Hibernate version: 2.1.6

Name and version of the database you are using: SQL Server 2000

Debug level Hibernate log excerpt: SQL Error: 107, SQLState: HY000

I got a class:
Code:
public class Account
{
   public final static int STATUS_REG = 1;
   private objID: Long;
   private status: int
                ...
}

When excecuting the HQL :

from Account a
where a.status = com.xxx.domain.account.Account.STATUS_REG

or

from Account a
where a.status = 1

Everything is fine. However, if the HQL is

from Account a
where a.status = Account.STATUS_REG

The exception that the prefix


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.