@patrick1984 did you find any solution to your problem. If yes then please post it cause i too am facing a similar type of problem.
I have 2 questions while performing the outer join operation of 2 hibernate mapping files
1. Does both of the hibernate mapping files must have some info about association like <many-to-one> and <one-to-many>
2. Does left outer join using the following query
FROM TableVersionLogData as v left outer join v.versionID
get all the columns in the other table with which this table is performing the outer join?
Hibernate files which i am using are namely
TableVersionLogData.hbm.xml
TableVersion.hbm.xml
TableVersion.hbm.xml (maps to TableVersionData.java )is the parent table that has VersionID as the primary key
TableVersionLog.hbm.xml(maps to TableVersionLogData.java ) is the table that has versionID as the foreign key in the database and i have added the follwing code in TableVersionLog.hbm.xml
Code:
"<many-to-one name="versionID" column="versionID" class="TableVersionData"/>"
but when i run the above query i get the error saying that the columns in the TableVersion.hbm.xml cannot be seen from TableVersionLog.hbm.xml
Exception is
Code:
"org.hibernate.QueryException: could not resolve property: versionName of: TableVersionLogData [ FROM TableVersionLogData as v left outer join v.versionID ] "
Could any one please let me know where i am making a mistake