-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate.STRING Type is not working?
PostPosted: Thu Aug 24, 2006 10:56 am 
Beginner
Beginner

Joined: Tue Jun 06, 2006 7:56 am
Posts: 20
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0

Mapping documents:

<hibernate-mapping package="com.lib">

<class name="Role" table="Role">
<id name="roleid" column="RoleId" type="string">
<generator class="native"/>
</id>

<property name="privilege" column="Privilege" type="serializable" />
</class>

</hibernate-mapping>

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

Full stack trace of any exception that occurs:

Name and version of the database you are using:
sql2000

The generated SQL (show_sql=true):[/b
SQLQuery query = session.createSQLQuery("select af.privilege from from Role af");
query.addScalar("privilege",Hibernate.STRING);

[b]Debug level Hibernate log excerpt:

line 1:18: unexpected token: from

Hi to all,

Actually I have Mssql2000 Role table
It contains rolid(varchar 20)
and
Privilege (text 16) . It contains xml formated data.

But Using

SQLQuery query = session.createSQLQuery("select af.privilege from from Role af");
query.addScalar("privilege",Hibernate.STRING);

I got Error.

Is Hibernate.String or any type.

Pls tell me some Idea?

Thanks
Edward Durai. A


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 24, 2006 12:35 pm 
Senior
Senior

Joined: Wed Aug 17, 2005 12:56 pm
Posts: 136
Location: Erie, PA (USA)
Check your SQL -- "... from from ..." is not valid.

_________________
---- Don't forget to rate! ----


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.