 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [Hibernate-JIRA] Created: (HHH-2807) Impossible to define caching for a subclass's collection in hibernate.cgf.xml
                                
                                
                                
                                    
                                        by Sebastien Blind (JIRA)
                                    
                                
                                
                                        Impossible to define caching for a subclass's collection in hibernate.cgf.xml 
------------------------------------------------------------------------------
                 Key: HHH-2807
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2807
             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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
                                
                         
                        
                                
                                18 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [Hibernate-JIRA] Commented: (HHH-925) DetachedCriteria.createCriteria not working with alias
                                
                                
                                
                                    
                                        by Philip Saville (JIRA)
                                    
                                
                                
                                        
    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-925?page=co... ] 
Philip Saville commented on HHH-925:
------------------------------------
I would like to see this issue fixed in the next build - it is very frustrating to have to keep applying a patch to hibernate for something so trivial yet fundamental in functionality.
I also recommend the priority be increased, since this is a serious problem in the core of hibernate, even though the fix is trivial.
> DetachedCriteria.createCriteria not working with alias
> ------------------------------------------------------
>
>                 Key: HHH-925
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-925
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.0 alpha, 3.0 beta 1, 3.0 beta 2, 3.0 beta 3, 3.0 beta 4, 3.0 rc 1, 3.0 final, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1 beta 1, 3.1 beta 2
>         Environment: Hibernate 3.0.5, Oracle
>            Reporter: Felipe Cuozzo
>            Priority: Minor
>         Attachments: DetachedCriteria.patch
>
>   Original Estimate: 10 minutes
>  Remaining Estimate: 10 minutes
>
> DetachedCriteria.createCriteria(associationPath, alias) is calling the wrong Criteria.createCriteria method
> public DetachedCriteria createCriteria(String associationPath, String alias)
> throws HibernateException {
> 	return new DetachedCriteria( impl, criteria.createCriteria(associationPath) );
> }
> should be:
> public DetachedCriteria createCriteria(String associationPath, String alias)
> throws HibernateException {
> 	return new DetachedCriteria( impl, criteria.createCriteria(associationPath, alias) );
> }
-- 
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
        
                                
                         
                        
                                
                                18 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [Hibernate-JIRA] Created: (ANN-655) reuse column name in JoinTable
                                
                                
                                
                                    
                                        by Francisco Philip (JIRA)
                                    
                                
                                
                                        reuse column name in JoinTable
------------------------------
                 Key: ANN-655
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-655
             Project: Hibernate Annotations
          Issue Type: Bug
    Affects Versions: 3.2.0.ga
         Environment: JBoss Version: 4.0.5.GA
Hibernate-Version: 3.2.0.ga
Hibernate Annotations: 3.2.0.GA
Win XP
Mys SQL 5.015
            Reporter: Francisco Philip
Hi, please forgive my english, but Im lost and I don't see if this is a bug or limitation, but I can't reuse a column ina ManyToMany association.
This is important because the schema is implemented and I need evaluate de migration.
public class Context {
	@Id String id;
	@Column name;
}
public class Group {
	@Id Context context;
	@Id String id;
	@Column name;
	@ManyToMany
	@JoinTable(
            joinColumns = {
            @JoinColumn(name = "context_id", referencedColumnName = "context_id"),
            @JoinColumn(name = "group_id", referencedColumnName = "id")},
            inverseJoinColumns = {
            @JoinColumn(name = "context_id", referencedColumnName = "context_id"),
            @JoinColumn(name = "role_id", referencedColumnName = "id")})
	Set<Role> roles;
	
}
public class Role {
	@Id Context context;
	@Id String id;
	@Column name;
}
Error: org.hibernate.MappingException: Repeated column in mapping for collection: test.Group.roles column: context_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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
                                
                         
                        
                                
                                18 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [Hibernate-JIRA] Closed: (HHH-1488) ArrayIndexOOB exception: org.hibernate.event.def.DefaultFlushEntityEventListener:checkNaturalId(), line 79
                                
                                
                                
                                    
                                        by Gail Badner (JIRA)
                                    
                                
                                
                                        
     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1488?page=c... ]
Gail Badner closed HHH-1488.
----------------------------
> ArrayIndexOOB exception: org.hibernate.event.def.DefaultFlushEntityEventListener:checkNaturalId(), line 79
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-1488
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1488
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1.2
>         Environment: Windows, Sun 1.5 JDK, Hibernate 3.1.2, Oracle 9i
>            Reporter: Dave Nebinger
>
> The checkNaturalId() method has a bug.  Basically it's using "loaded[prop]" in the isEqual() method call but it should be using "loaded[i]".
> The value for prop is the index into the array of properties for the entity where the natural key is.  The value for i is the index in the loaded[] array that is being checked.  In my case I've got a single natural key so loaded[0] equals the natural key value, but it is located at position 1 in the properties[15] array.
> The full line, "if ( !types[prop].isEqual( current[prop], loaded[prop], entityMode ) ) {" throws ArrayIndexOOB exception since prop is 1 but only loaded[0] (i) is valid.
> The fix is quite simple, just change the line to read: "if ( !types[prop].isEqual( current[prop], loaded[i], entityMode ) ) {"
-- 
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
        
                                
                         
                        
                                
                                18 years, 2 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [Hibernate-JIRA] Resolved: (HHH-1488) ArrayIndexOOB exception: org.hibernate.event.def.DefaultFlushEntityEventListener:checkNaturalId(), line 79
                                
                                
                                
                                    
                                        by Gail Badner (JIRA)
                                    
                                
                                
                                        
     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1488?page=c... ]
Gail Badner resolved HHH-1488.
------------------------------
    Resolution: Duplicate
Closing as a duplicate of HHH-1569.
> ArrayIndexOOB exception: org.hibernate.event.def.DefaultFlushEntityEventListener:checkNaturalId(), line 79
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-1488
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1488
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1.2
>         Environment: Windows, Sun 1.5 JDK, Hibernate 3.1.2, Oracle 9i
>            Reporter: Dave Nebinger
>
> The checkNaturalId() method has a bug.  Basically it's using "loaded[prop]" in the isEqual() method call but it should be using "loaded[i]".
> The value for prop is the index into the array of properties for the entity where the natural key is.  The value for i is the index in the loaded[] array that is being checked.  In my case I've got a single natural key so loaded[0] equals the natural key value, but it is located at position 1 in the properties[15] array.
> The full line, "if ( !types[prop].isEqual( current[prop], loaded[prop], entityMode ) ) {" throws ArrayIndexOOB exception since prop is 1 but only loaded[0] (i) is valid.
> The fix is quite simple, just change the line to read: "if ( !types[prop].isEqual( current[prop], loaded[i], entityMode ) ) {"
-- 
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
        
                                
                         
                        
                                
                                18 years, 2 months