Hibernate version: 3.1
I am tring to use a set in one of my hibernate mappings that has a WHERE Clause in it. The clause needs to reference a table to grab the maximum date of a column. I am also working with a particular schema (default_schema in the hibernate config file), and I was wondering how to get at the schema name without explicitly typing it in.
<set name="aSet" inverse="true" lazy="false" where="prop1=SELECT MAX(Date) FROM SCHEMA_NAME.Table T">
<key>
<column name="col1" not-null="true" />
<column name="col2" not-null="true" />
</key>
<one-to-many class="test.TestClass" />
</set>
Is there some sort of substitution I could do like ${default_schema}, or something along those lines?
Thanks,
Jeremy
|