[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1699) "where" attribute not include to join condition
Mike W (JIRA)
noreply at atlassian.com
Thu Oct 4 15:03:25 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28359 ]
Mike W commented on HHH-1699:
-----------------------------
I have noticed this issue with version 3.2.1 as well.
> "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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list