[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2808) CLONE -Impossible to define caching for a subclass's collection in hibernate.cgf.xml
Gail Badner (JIRA)
noreply at atlassian.com
Tue Aug 28 13:22:23 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27964 ]
Gail Badner commented on HHH-2808:
----------------------------------
Please attach a runnable test case (mapping and java).
> CLONE -Impossible to define caching for a subclass's collection in hibernate.cgf.xml
> -------------------------------------------------------------------------------------
>
> Key: HHH-2808
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2808
> Project: Hibernate3
> Issue Type: Bug
> Components: caching (L2)
> Affects Versions: 3.2.5
> Environment: Hibernate 3.2.5
> Sybase
> Reporter: Sebastien Blind
>
> Basically, hibernate allows to define <cache usage="transactional"/> inside the subclass mapping, i.e.
> <subclass name="SubClass" extends="BaseClass" discriminator-value="xxx">
> <bag name="subClassLinks" lazy="false" inverse="true" batch-size="100">
> <cache usage="transactional" region="xxx"/>
> <key column="xxx" not-null="true"/>
> <one-to-many class="xxx"/>
> </bag>
>
> <join table="xxx">
> </join>
> </subclass>
> but it's not allowed to do the same using <collection-cache collection="subClass.myCollection" region="xxx" usage="transactional"/>.
> It throws:
> Exception in thread "main" org.hibernate.MappingException: Cannot cache an unknown collection: subClass.myCollection
> at org.hibernate.cfg.Configuration.setCollectionCacheConcurrencyStrategy(Configuration.java:1984)
> at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1568)
> at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1534)
> at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1508)
> at org.hibernate.cfg.Configuration.configure(Configuration.java:1428)
--
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