• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate.STRING Type is not working?

 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate version: 3.0

<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>

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

error i am geting
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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing to do with Hibernate.STRING. You've got two "froms" in your SQL.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic