[Hibernate-JIRA] Created: (HHH-5052) EventListenerConfigurator uses Ejb3Configuration but could use AnnotationConfiguration instead
by Alexandre Walter Pretyman (JIRA)
EventListenerConfigurator uses Ejb3Configuration but could use AnnotationConfiguration instead
----------------------------------------------------------------------------------------------
Key: HHH-5052
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5052
Project: Hibernate Core
Issue Type: Improvement
Components: annotations, entity-manager
Affects Versions: 3.5.0-CR-2, 3.5.0-CR-1, 3.5.0-Beta-4, 3.5.0-Beta-3, 3.5.0-Beta-2, 3.5.0.Beta-1, 3.3.2, 3.3.1, 3.3.0.SP1, 3.3.0.GA, 3.3.0.CR2, 3.3.0.CR1, 3.2.7, 3.2.6
Environment: Tested with Hibernate 3.2.6ga, Annotations 3.2.1ga, EntityManager 3.3.2ga but seems to affect the code in the trunk.
Reporter: Alexandre Walter Pretyman
Priority: Trivial
The class EventListenerConfigurator uses Ejb3Configuration on it's constructor, but it could use AnnotationConfiguration directly, as the methods called on the Ejb3Configuration instance by the EventListenerConfigurator, are actually delegations to the AnnotationConfiguration .
--
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
14 years, 5 months
[Hibernate-JIRA] Created: (HHH-2309) fetch only the lazy property needed
by German de la Cruz (JIRA)
fetch only the lazy property needed
------------------------------------
Key: HHH-2309
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2309
Project: Hibernate3
Type: New Feature
Components: core
Versions: 3.2.1
Reporter: German de la Cruz
The method AbstractEntityPersister.initializeLazyProperty(..) load all lazy properties when it's called. It would be great if could only load the requested property.
I think the only change we need is in AbstractEntityPersister.initializeLazyPropertiesFromDatastore(...) and AbstractEntityPersister.initializeLazyPropertiesFromCache(...). We must change them in a way that only the referenced property is loaded.
After that, we must change AbstractFieldInterceptor.intercept(..) to update in a better way the unitializedFields collection (I mean, removing the actual property only instead of null it).
Besides. Why in line 777 to 780 a query is executed? I think it isn't necessary.
Thanks.
--
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
14 years, 5 months
[Hibernate-JIRA] Updated: (HHH-1851) relax special handling of 'id' property
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851?page=c... ]
Gail Badner updated HHH-1851:
-----------------------------
Fix Version/s: (was: 3.5.4)
3.5.x
> relax special handling of 'id' property
> ---------------------------------------
>
> Key: HHH-1851
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851
> Project: Hibernate Core
> Issue Type: Improvement
> Components: query-hql
> Environment: independent, all versions all databases.
> Reporter: Gunther Schadow
> Assignee: Steve Ebersole
> Fix For: 3.5.x
>
> Attachments: IdClassAndAnotherPropertyNamedId.zip
>
>
> Hibernate has long treated 'id' in a special manner in HQL and Criteria queries. The drawback to this has always been that it effectively means users cannot define non-identifier properties named id and refer to those properties in HQL/Criteria queries.
> Thus, I will change this such that:
> (1) 'id' can still be used to refer to the identifier property, whatever the property's actual name, as long as the entity does not define a non-identitifer property named id.
> (2) if the entity defines a non-identifier property named 'id', using 'id' in HQL or Criteria queries will refer to this non-identifier property; users would need to refer to the identifier property by its actual name.
> FYI, the original reason for this feature was to support entity's which did not define an identifier property at all (users were responsible for managing the ids seperately. That feature was never really recommended and has been deprecated since early in the 3.x development.
--
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
14 years, 5 months
[Hibernate-JIRA] Created: (HHH-5239) Criteria.setLockMode KO
by bill dupond (JIRA)
Criteria.setLockMode KO
-----------------------
Key: HHH-5239
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5239
Project: Hibernate Core
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.5.1, 3.5.0-Final
Environment: MySQLDialect
Reporter: bill dupond
This code doesn't work : the "for update " isn't add in the SQL query.
crit = HibernateUtil.currentSession().createCriteria(TIncident.class);
crit.add( Restrictions.ge("incDateImportCairn", dateImportCairnMin) );
crit.setLockMode(LockMode.PESSIMISTIC_WRITE);
crit.list();
the debug line :
20/05/10 03:19:11-Thread[main]-Class[SQL] | DEBUG | select this_.INC_ID as INC1_25_0_, this_.INC_ID_RATTACHEMENT as INC2_25_0_, this_.TIC_ID as TIC3_25_0_, this_.EQU_ID as EQU4_25_0_, this_.OPE_ID as OPE5_25_0_, this_.INC_DATE_IMPORT_CAIRN as INC6_25_0_, this_.INC_DATE_DEBUT as INC7_25_0_, this_.INC_DATE_FIN as INC8_25_0_, this_.INC_DUREE as INC9_25_0_, this_.INC_DATE_APPARITION_ALARME as INC10_25_0_, this_.INC_DUREE_MOIS as INC11_25_0_, this_.INC_DUREE_HEURE as INC12_25_0_, this_.INC_INSTANCE_OBJET as INC13_25_0_, this_.INC_CLASSE_OBJET as INC14_25_0_, this_.INC_NATURE_INCIDENT as INC15_25_0_, this_.INC_IMPACT_CLIENT as INC16_25_0_, this_.INC_CAUSE_INFORMATIVE as INC17_25_0_, this_.INC_PROBLEME_SPECIFIQUE as INC18_25_0_, this_.INC_INDICATION_TENDANCE as INC19_25_0_, this_.INC_TYPE_ALARME as INC20_25_0_, this_.INC_TYPE_INCIDENT as INC21_25_0_, this_.INC_CAUSE_N1 as INC22_25_0_, this_.INC_CAUSE_N2 as INC23_25_0_, this_.INC_CAUSE_N3 as INC24_25_0_, this_.INC_CAUSE_PROBABLE as INC25_25_0_, this_.INC_SEVERITE as INC26_25_0_, this_.INC_STATUT_ENREGISTREMENT as INC27_25_0_, this_.INC_COMMENTAIRE as INC28_25_0_, this_.INC_NB_CELL as INC29_25_0_, this_.INC_INDICATEUR_MISE_A_JOUR_IHM as INC30_25_0_, this_.INC_INDICATEUR_ASSOCIATION_TICKET as INC31_25_0_, this_.INC_INDICATEUR_ASSOCIATION_OPERATION as INC32_25_0_, this_.INC_INDICATEUR_PRISE_EN_COMPTE as INC33_25_0_ from pcrn01.t_incident this_ where this_.INC_DATE_IMPORT_CAIRN>=?
--
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
14 years, 5 months
[Hibernate-JIRA] Created: (HHH-5328) Equality check on a natural-id that references other entities
by Manuel Schrag (JIRA)
Equality check on a natural-id that references other entities
-------------------------------------------------------------
Key: HHH-5328
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5328
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.1
Reporter: Manuel Schrag
I have the following entity mapping:
{code:xml}
<class name="ch.ims.cufa.data.model.SystemSettingImpl" table="TB_SystemSetting">
<id name="id" type="string" column="id" length="32">
<generator class="uuid.hex"/>
</id>
<natural-id mutable="true">
<many-to-one name="orgCanton" class="ch.ims.cufa.data.model.OrgCantonImpl" cascade="none" lazy="false" foreign-key="FK_A_OrgCanto_SysSetti" unique="true">
<column name="COL_orgCanton" not-null="true">
</column>
</many-to-one>
</natural-id>
</class>
</hibernate-mapping>
{code}
Updating fails because hibernate invokes the equals() method on OrgCantonImpl but as the parameter it sends the id of the Object to compare, which returns always false. This ends up in an exception: immutable natural identifier was modified...
--
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
14 years, 5 months