[Hibernate-JIRA] Created: (ANN-634) @CollectionOfElements cannot be combined with @Filter or @Where
by Emmanuel Bernard (JIRA)
@CollectionOfElements cannot be combined with @Filter or @Where
---------------------------------------------------------------
Key: ANN-634
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-634
Project: Hibernate Annotations
Issue Type: Bug
Components: binder
Affects Versions: 3.3.0.ga
Reporter: Emmanuel Bernard
Assignee: Emmanuel Bernard
Fix For: 3.3.1
Caused by: org.hibernate.MappingException: @ManyToMany or @CollectionOfElements defining filter or where without join fetching not valid within collection using join fetching[xxxx]
at org.hibernate.cfg.annotations.CollectionBinder.checkFilterConditions(CollectionBinder.java:1249)
at org.hibernate.cfg.annotations.CollectionBinder.bindManyToManySecondPass(CollectionBinder.java:1235)
at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:576)
at org.hibernate.cfg.annotations.MapBinder$1.secondPass(MapBinder.java:79)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:316)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
--
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
17 years, 5 months
[Hibernate-JIRA] Created: (HHH-2722) incorrect sql on custom types when using dynamic update, optimistic-lock="dirty", select-before-update when null value in where clause
by Alex McCarrier (JIRA)
incorrect sql on custom types when using dynamic update, optimistic-lock="dirty", select-before-update when null value in where clause
--------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-2722
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2722
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.2
Environment: hibernate 3.2.2, oracle 10g
Reporter: Alex McCarrier
Priority: Minor
We are using optimistic-lock="dirty", dynamic-update="true" and select-before-update="true" on some of our classes. This seems to be isolated to cases where we are using custom types that implement the UserType interface.
The SQL that is generated by hibernate for the PreparedStatement looks something like this:
delete from TABLE_NAME where PK = :1 and SOME_NUMBER = :2
The problem happens when the value for SOME_NUMBER is null. It still tries to use the above sql, rather than using the correct:
delete from TABLE_NAME where PK = :1 and SOME_NUMBER is null.
In this case, SOME_NUMBER is defined in Oracle as a FLOAT, and in the mapped object as double. Interestingly, another one of our custom types which is a Binary type (Hibernate.BINARY.sqlType) has no problems.
--
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
17 years, 5 months
[Hibernate-JIRA] Created: (HBX-959) allow foreign key property name override
by Dan Allen (JIRA)
allow foreign key property name override
----------------------------------------
Key: HBX-959
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-959
Project: Hibernate Tools
Issue Type: Improvement
Components: hbm2java
Affects Versions: 3.2beta9, 3.2beta10
Reporter: Dan Allen
Priority: Minor
Without any special settings, the hbm2java tool will assign the @ManyToOne property the same name as the target class. For instance, let's say you have an employee table. Each employee can have a manager, who is also an employee. The column name might be manager_id, but the hbm2java tool will name the property employee. In this case, it is desirable to override the name of the property to be manager instead of employee. Currently, there is no way to do this if foreign keys are active on the table. It IS possible if foreign keys are NOT defined on the table since then the foreign-key element in *.reveng.xml comes into play. The problem comes when you try to override the foreign-key, it just ends up created TWO @ManyToOne properties.
What I am looking for (in hypothetical) is:
<column name="manager_id" property="manager" />
Obviously, that syntax only works for basic types, not associations. There needs to be way to override the foreign-key settings WITHOUT creating a new foreign key relationship. The location in the code where the property name is decided is JDBCBinder#bindOutgoingForeignKeys() which then delegates to ReverseEngineeringStrategy#revengStrategy.foreignKeyToEntityName()
--
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
17 years, 5 months