Forums Register Login

Problem selecting data from the database: Hibernate

+Pie Number of slices to send: Send
Hi everyone,

I'm new to Hibernate. When I'm trying to select data from the database, the following exception occurs:

in expected: RELATION [SELECT RELATION.FRID FROM TB_HIBERNATE_RELATION RELATION]

Here is the code which I wrote :

Session session = null;
SessionFactory _factory = new Configuration().configure().buildSessionFactory();
session = _factory.openSession();
org.hibernate.Transaction tx = session.beginTransaction();
String currentFR = "SELECT RELATION.FRID FROM TB_HIBERNATE_RELATION RELATION";
Query query = session.createQuery(currentFR);


Please help me on this: I'm using MS SQL Server2000 database

Thanks,
Midhun
+Pie Number of slices to send: Send
Can you post the stack trace? Can you tell us about the mapping of the class TB_HIBERNATE_RELATION.
+Pie Number of slices to send: Send
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 892 times.
Similar Threads
How data stored in Database
Hibernate_listing database values
Problem with select
Could not parse mapping document from resource PojoTestTable.hbm.xml
Hibernate:Problem in updaing data to the database
More...

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