[hibernate-issues] [Hibernate-JIRA] Created: (ANN-745) @Where annotation is not processed with "Extra-lazy" loading
Gregory Klimov (JIRA)
noreply at atlassian.com
Thu May 29 08:06:38 EDT 2008
@Where annotation is not processed with "Extra-lazy" loading
------------------------------------------------------------
Key: ANN-745
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-745
Project: Hibernate Annotations
Issue Type: Bug
Reporter: Gregory Klimov
Priority: Minor
Consider code:
public class Transaction {
...
@OneToMany
@Fetch(FetchMode.SUBSELECT)
@LazyCollection(LazyCollectionOption.EXTRA)
@Where(clause = "entity=4")
@JoinColumn(name = "entity_id")
private List<Alert> alerts;
...
}
public class Alert {
...
@Any(metaColumn = @Column(name = "entity"), fetch = FetchType.LAZY)
@AnyMetaDef(
idType = "long",
metaType = "integer",
metaValues = {
@MetaValue(value = "4", targetEntity = Document.class),
@MetaValue(value = "9", targetEntity = Transaction.class)})
@JoinColumn(name = "entity_id", insertable = false, updatable = false)
private Object relatedObject;
...
}
produces wrong SQL on size retrieval operation:
select
count(id)
from
alerts
where
entity_id =?
--
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