Forums Register Login

Hibernate.STRING Type is not working?

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Nothing to do with Hibernate.STRING. You've got two "froms" in your SQL.
grapes are vegan food pellets. Eat this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1251 times.
Similar Threads
Please HELP with Hibernate Mapping!
how to get data from alias
Hibernate
Hibernate 3.1
Hibernate: Problem getting a simple list
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:24:43.