]
Gail Badner commented on HHH-1699:
----------------------------------
Please attach a runnable test case (Java + mapping).
"where" attribute not include to join condition
-----------------------------------------------
Key: HHH-1699
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1699
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.1.3
Reporter: Renat Yusupov
Priority: Critical
So,
<class name="SomeObject1" table="table1"
where="system='f'">
...
and
<class name="SomeObject2" table="table2">
...
<many-to-one name="someobject1" class="SomeObject1"
lazy="true" ...
In HQL query:
"from SomeObject2 a join fetch a.someobject1"
generated folowing SQL:
select * from table2 inner join table1 on (table2.someobject1_id=table1.id)
In this query where attribute is absent.
Right folowing SQL:
select * from table2 inner join table1 on (table2.someobject1_id=table1.id and
table1.system='f' )
I pached AbstractEntityPersister.
There is diff:
2514a2515
> ,getSQLWhereString(generateTableAlias(
name, j ))
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: