[Hibernate-JIRA] Commented: (HHH-1481) any mapping with composite id-type does not work
by Niels Bertram (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1481?page=c... ]
Niels Bertram commented on HHH-1481:
------------------------------------
Any chance the any mapping can be fixed soon?
> any mapping with composite id-type does not work
> ------------------------------------------------
>
> Key: HHH-1481
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1481
> Project: Hibernate Core
> Issue Type: Patch
> 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, 3.1 rc 1, 3.1 rc2, 3.1 rc3, 3.1, 3.1.1, 3.1.2, 3.2.0.alpha1, 3.1.3
> Environment: Hibernate 3.1.2
> Reporter: Michael Matt
> Attachments: patch.zip
>
> Original Estimate: 10 minutes
> Remaining Estimate: 10 minutes
>
> Any mapping with composite id-type throws MappingException 'property mapping has wrong number of columns'.
> The zipped patch file contains:
> -bugfix for AnyType.java
> - testcases any mapping with simple id-type and composite id-type
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-3584) Generate SQL when Dynamic Update is true is including version field even when marked as updateable=false
by Dave Stephan (JIRA)
Generate SQL when Dynamic Update is true is including version field even when marked as updateable=false
--------------------------------------------------------------------------------------------------------
Key: HHH-3584
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3584
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1, 3.2.4.sp1
Reporter: Dave Stephan
If an entity has the annotation:
@Enitity(dynamicUpdate=true)
And a field annotated as :
@Version
@Generated(GenerationTime.Always)
@Column(updateable=false, insertable=false)
The generated update sql will include the annotated field in the properties to be updated. This is incorrect and causes exceptions in certain cases. E.g updating a view where the resulting columns cross multiple tables.
When the dynamicUpdate is set to true, the sql string is generated dynamically and initially the field marked as updateable=false is flagged as not to be included. The AbstractEntityPersiter.getPropertiesToUpdate method then checks if there is a versioning field, finds the above annotated column and now flags it to be included, neglecting to check whether this versioning field has also been marked as updateable=false, or whether @Generated(GenerationTime.ALWAYS) is there. (Although the last isn't really necessary as this annotation can't be there without the column being marked as not updateable and not insertable.)
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (EJB-411) Composite Key with Sequence
by Frederico (JIRA)
Composite Key with Sequence
---------------------------
Key: EJB-411
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-411
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.4.0.CR1
Environment: EntityManager Package 3.4, Postgresql 8.3, JSF 1.2, EJB 3.0 and Glassfish V2R2
Reporter: Frederico
Attachments: entitys.zip
I created a entity with a composite key, and one of attributes is a sequence. The problem is when I try to save the entity, the sequence attribute is not generated, and a not-null contraint is raised. The log shows to the hibernate is working with generator like assign, but, when I to remove the composite key and I change the primary key only to the sequence attribute, he works fine.
Fred
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-2855) Error during a entity collection loading - wrong SQL query generation - missing discriminator condition in the "where" clause for a specific subclass
by Peter Fassev (JIRA)
Error during a entity collection loading - wrong SQL query generation - missing discriminator condition in the "where" clause for a specific subclass
-----------------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-2855
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2855
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Reporter: Peter Fassev
Priority: Critical
Attachments: testcase.zip
There is a problem, when loading a entity collection (bag), when the collection element is a subclass. The query, witch fetches the elements of the collection, does not use the discriminator value of a subclass and thus loads also other elements form different classes. Please look at the simple test case I have provided.
Here is a simple description:
Having a base class A with two subclasses AA and AB, the class A has many-to-one connection to another base class B. The class B itself has two different collections (bags), the first contains only AA elements, the second bag BB elements. The classes AA and AB has different integer properties.
When I try to load an instance of class B, which is connected to some AA and AB instances, and than try to access the list of all connected AA instances, there is an exception, because Hibernate tries to load all AA and AB instances in one and the same AA collection. The exception is actually thrown, because Hibernate tries to instanciate an AA instance from a AB data! This is the case, because the selection query, which is generated automatically by Hibernate, does not use the discriminator value of the AA subclass to load the collection, and thus selects the AA and AB elements from the database.
WORKAROND: Currently, the only workaround i found is to define a "where" parameter in the hibernate-mapping with for each collection with the appropriated subclass discriminator.
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-2650) Allow for an entire Session to be readOnly, add Session.setReadOnly() method
by Gunther Schadow (JIRA)
Allow for an entire Session to be readOnly, add Session.setReadOnly() method
----------------------------------------------------------------------------
Key: HHH-2650
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2650
Project: Hibernate3
Issue Type: Sub-task
Components: core
Environment: Any
Reporter: Gunther Schadow
There is a need for read-only applications to avoid any snapshoting of objects if that application never intends to make updates. Such readOnly mode would be the mode in which any object gets loaded into the session, whether directly or from lazy collections. The use case is reporting applications which want to make sure that they don't even accidentally make updates AND that want to save the time it takes to create snapshots because they read through a lot of data very quickly. Our own need is that we have a rich client where we hold read only sessions open for browsing and where we spawn off any change transactions into separate Sessions. Even in change transactions we like to have all objects locked from even accidental updates unless they are explicitly unlocked.
A Session.setReadOnly() method would be ideal to do this. It does not appear very hard to make that improvement. We would do it ourselves even if we had some idea if (and under which criteria) our modifications would have a chance to make it into future versions of Hibernate?
--
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
15 years, 11 months