[Hibernate-JIRA] Created: (HHH-7250) Bug in SharedCache handling of Natural-id
by Guenther Demetz (JIRA)
Bug in SharedCache handling of Natural-id
-----------------------------------------
Key: HHH-7250
URL: https://hibernate.onjira.com/browse/HHH-7250
Project: Hibernate ORM
Issue Type: Bug
Components: caching (L2), core
Affects Versions: 4.1.2, 4.1.0
Environment: EHCache as shared cache implementation, using read-write strategy
Reporter: Guenther Demetz
Although configuring org.hibernate.cache.LookupNaturalId cache region large enough and eternal, I always have Warning messages like following:
{noformat}
15:47:27,999 WARN AbstractReadWriteEhcacheAccessStrategy:182 - HHH020008: Cache[hibernate.test.org.hibernate.cache.LookupNaturalId] Key[P##NaturalId[ud1C9grNWA]] Lockable[(null)]
A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly you should consider increasing the cache timeouts and/or capacity limits
15:47:27,999 WARN AbstractReadWriteEhcacheAccessStrategy:182 - HHH020008: Cache[hibernate.test.org.hibernate.cache.LookupNaturalId] Key[P##NaturalId[ud1C9grNWA]] Lockable[Lock Source-UUID:9ea7be15-29d2-432f-ba0b-961392e0c995 Lock-ID:2]
A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly you should consider increasing the cache timeouts and/or capacity limits
{noformat}
Debugging into hibernate, I detected that strangely at certain point in StatefulPersistenceContext.java
method RegionAccessStrategy#unlockRegion ist called, without ever calling lockRegion.
This unlockRegion call (in EHCache it clears the entire region!) has no sense here,
with evidency the removal of previousCacheKey item was intended here indeed.
Please see the pullrequest, it makes the warnings above dissappear.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[Hibernate-JIRA] Created: (HHH-7271) Foreign key properties need to allow mixing nullable and non-nullable keys
by Joachim Durchholz (JIRA)
Foreign key properties need to allow mixing nullable and non-nullable keys
--------------------------------------------------------------------------
Key: HHH-7271
URL: https://hibernate.onjira.com/browse/HHH-7271
Project: Hibernate ORM
Issue Type: Improvement
Components: annotations
Affects Versions: 3.6.10
Environment: 3.6.10, Oracle 10g (probably irrelevant)
Reporter: Joachim Durchholz
Tables L and R are in an optional relationship.
L's foreign key into R is composite and consists of two fields: K1 and K2. (This also means that R's primary key consists of two fields, which happen to also be named K1 and K2.)
L1 is part of L's primary key, so it can't be nullable.
L2 is nullable. It must be because otherwise the relationship would not be optional.
This works in standard hibernate, but Hibernate Annotations gives me this error:
"Mixing nullable and non nullable columns in a property is not allowed"
I could switch to using a synthetic PK on R. However, that would introduce an unwanted redundancy: L would not be allowed to link to a row in R that has diverging K1 and K2 fields.
The fields need to be present both in L and R, because the relationship is optional in both directions.
I do not understand why there is such a restriction in Annotations in the first place.
Even the other use of multi-column properties that I'm aware of, user types, seems to lose rather than win from it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[Hibernate-JIRA] Commented: (HHH-951) setMaxResults causes "ORA-00918: column ambiguously defined" exception
by Anton Stremoukhov (JIRA)
[ https://hibernate.onjira.com/browse/HHH-951?page=com.atlassian.jira.plugi... ]
Anton Stremoukhov commented on HHH-951:
---------------------------------------
I can confirm that bug in hibernate 3.3.2.GA and 3.2.6.GA. Please fix
> setMaxResults causes "ORA-00918: column ambiguously defined" exception
> -----------------------------------------------------------------------
>
> Key: HHH-951
> URL: https://hibernate.onjira.com/browse/HHH-951
> Project: Hibernate ORM
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5, 3.1 beta 2, 3.5.3, 3.6.1
> Environment: hibernate3.0.5, hibernate3.1b2, Oracle 9
> Reporter: Karel Sommer
> Attachments: HHH951Project.zip, Hibernate_SQL_HHH-5579.txt, Hibernate_StackTrace_HHH-5579.txt, patch.951, TestCase_for_Hibernate_Core_Issue_HHH-5579.zip
>
>
> when create criteria with associations, i get this error:
> ORA-00918: column ambiguously defined
> mapping:
> <class name="User" table="FRAME_USER" dynamic-update="true" dynamic-insert="true">
> <id name="id" type="long" unsaved-value="null">
> <column name="ID" not-null="true"/>
> <generator class="sequence">
> <param name="sequence">frame_user_seq</param>
> </generator>
> </id>
> <version type="timestamp" column="stamp" name="timestamp" unsaved-value="null"/>
> <property name="user_name" type="string" not-null="true"/>
> <property name="blocked" type="yes_no" not-null="true"/>
> <property name="access_logon" type="timestamp"/>
> <property name="denied_logon" type="timestamp"/>
> <property name="inactivity_time" type="long"/>
> <property name="session_count" type="long"/>
> <idbag name="terminalGroups" table="FRAME_USER_TERMINAL" fetch="join" outer-join="true">
> <collection-id column="ID" type="long">
> <generator class="sequence">
> <param name="sequence">frame_user_terminal_seq</param>
> </generator>
> </collection-id>
> <key column="id_user"/>
> <many-to-many column="id_terminal_groups" class="TerminalGroup" fetch="join" outer-join="true"/>
> </idbag>
> </class>
> <class name="TerminalGroup" table="FRAME_TERMINAL_GROUPS" dynamic-update="true" dynamic-insert="true">
> <id name="id" type="long" unsaved-value="null">
> <column name="ID" not-null="true"/>
> <generator class="sequence">
> <param name="sequence">frame_terminal_groups_seq</param>
> </generator>
> </id>
> <version type="timestamp" column="stamp" name="timestamp" unsaved-value="null"/>
> <property name="name" column="group_name" type="string" not-null="true"/>
> <idbag name="terminals" table="FRAME_TERMINAL_REL" fetch="join" outer-join="true">
> <collection-id column="ID" type="long" >
> <generator class="sequence">
> <param name="sequence">frame_terminal_rel_seq</param>
> </generator>
> </collection-id>
> <key column="id_term_group"/>
> <many-to-many column="id_term" class="Terminal" fetch="join" outer-join="true"/>
> </idbag>
> </class>
> <class name="Terminal" table="FRAME_TERMINAL" where="status != 'D'" dynamic-update="true" dynamic-insert="true">
> <id name="id" type="long" unsaved-value="null">
> <column name="ID" not-null="true"/>
> <generator class="sequence">
> <param name="sequence">frame_terminal_seq</param>
> </generator>
> </id>
> <version type="timestamp" column="stamp" name="timestamp" unsaved-value="null"/>
> <property name="status" type="char" not-null="true"/>
> <property name="mac" type="string" not-null="true"/>
> <property name="name" column="ident" type="string" not-null="true"/>
> <property name="description" type="string"/>
> code:
> session.createCriteria(User.class)
> .add(Restrictions.like("user_name", "%")
> .createCriteria("terminalGroups")
> .add( Restrictions.like("group_name", "%").
> .setProjection(Projections.rowCount())
> .uniqueResult();
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[Hibernate-JIRA] Created: (HHH-7270) Support for IMS Transaction Manager running on z/OS on System z Hardware
by Denis Gaebler (JIRA)
Support for IMS Transaction Manager running on z/OS on System z Hardware
------------------------------------------------------------------------
Key: HHH-7270
URL: https://hibernate.onjira.com/browse/HHH-7270
Project: Hibernate ORM
Issue Type: New Feature
Components: core
Affects Versions: 4.1.2
Environment: IMS Transaction Manager JVM enabled environments
Operating System: z/OS Hardware: System z
All Hibernate versions, Databases: Supported versions of IMS DB Hierarchical Database with Open Database SQL Support and DB2 for z/OS
Reporter: Denis Gaebler
Priority: Blocker
Attachments: IMSTransactionManagerLookup.java
There is customer demand to use Hibernate in IMS Transaction Manager.
Currently they use ResinTransactionManagerLookup class, which one customer complained about, why there is no IMS in the name, when there is JBoss, WebSphere, etc.
So I would like to add the IMSTransactionManagerLookup class to the org.hibernate.transaction package.
The 16 lines of source code required for this support are attached.
Thanks,
Denis Gaebler.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months