Hi All,
Hopefully someone can help with my problem, I'll give some detailed info below, but the summary is
I'm trying to map an Entity class to a property in another Entity, and I'm not having much luck, there's no error when
jboss starts up, but when I try a hql query for example, I get an error 'could not resolve property'
in my applicationContext.xml I have
This is fine, seems to pickup the classes
my classes are more or less
and
the fields in the tables are
my_session ->
int id
int device_id
int session_id
device ->
int id
varchar guid
I tried using @Embedded for getDevice in the MySession class, but on queries it complained with something similar to 'cannot find column in field list' and the sql that was generated wasn't doing any join on the devices table, it was looking for device_id in the MySession's table.
When I try to do
it fails on the createQuery with
Thanks for reading this far, and hopefully you can help ;)
I'm trying to avoid any hbm.xml files (migrating away from all that at the moment) and hoping to use pure annotations
hmm what I'm basically trying to do with Annotations what you could do with
Do if I did a hql query "from MySession where device.guid = 'testguid' " ... it would return me the MySession with the Device that has guid = 'testguid'
Kindest regards
Bal