[hibernate-issues] [Hibernate-JIRA] Moved: (HHH-3319) @Where annotation is not processed with "Extra-lazy" loading
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Sat May 31 14:34:32 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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: 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