I've an odd problem with my hibernate. I've mapped it to a class and can easily do inserts. However when it comes to doing a select, hibernate complains my given class isn't mapped.
The class code itself is as simple as it gets: it contains 4 attributes and the corresponding getters / setters. The class also contains a static method used to generate uuids.
My config file includes:
And the contents of Federation.hbm.xml are:
My db table is as follows (mysql):
My class attributes and getters / setters:
So where have I erred?
Thanks for your help...
No matter what they say in Ohio, we're still first in flight!
Actually the insert works fine. Only the listing (method listItems) doesn't work which probably means I made a mistake there. I'll try to figure it out and update this thread hopefully.
No matter what they say in Ohio, we're still first in flight!
the problem is that when I executed my select query in HQL, I gave the sql table name rather than the java class name as the from attributes e.g. from federations (my sql table) rather than from federation (my class).
No matter what they say in Ohio, we're still first in flight!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.