]
Emmanuel Bernard moved ANN-745 to HHH-3319:
-------------------------------------------
Requires Release Note: [Affirmative]
Key: HHH-3319 (was: ANN-745)
Project: Hibernate3 (was: Hibernate Annotations)
@Where annotation is not processed with "Extra-lazy"
loading
------------------------------------------------------------
Key: HHH-3319
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3319
Project: Hibernate3
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: