[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-816?page=co...
]
Roman Pokhodzhai commented on ANN-816:
--------------------------------------
These is a wicked method which generates JOIN condition
public String getOnCondition(String alias, SessionFactoryImplementor factory, Map
enabledFilters)
throws MappingException {
if ( isReferenceToPrimaryKey() ) { //TODO: this is a bit arbitrary, expose a switch to
the user?
return "";
}
else {
return getAssociatedJoinable( factory ).filterFragment( alias, enabledFilters );
}
}
@Where annotation doesn't work for *-To-One kind of relations
when non-lazy fetch
---------------------------------------------------------------------------------
Key: ANN-816
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-816
Project: Hibernate Annotations
Issue Type: Bug
Components: binder
Affects Versions: 3.3.1.GA
Reporter: Roman Pokhodzhai
When mapping contain ManyToOne relation and EAGER fetch(SELECT/JOIN) "where"
annotation is not taken into account.
The same for OneToOne annotations where "mappedBy" is not specified
org.hibernate.type.EntityType has uniqueKeyPropertyName property.
When this property is NULL(for ManyToOne is always NULL) then "where" condition
is not applied.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira