[Hibernate-JIRA] Created: (HHH-2661) Second-level cache is used after Session.setCacheMode(CacheMode.IGNORE)
by Anders Wallgren (JIRA)
Second-level cache is used after Session.setCacheMode(CacheMode.IGNORE)
-----------------------------------------------------------------------
Key: HHH-2661
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2661
Project: Hibernate3
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.2.4.sp1
Environment: Windows Vista
MySQL 5.0
Reporter: Anders Wallgren
I'm doing some bulk importing and want to disable the L2 cache, so I call Session.setCacheMode(CacheMode.IGNORE) before doing any work.
However, the entities I'm creating still end up in the cache. It seems that org.hibernate.action.CollectionAction isn't doing the correct check to determine when to cache -- it only check for the existence of a configured cache, but doesn't check whether caching is enabled in the session.
For example, from CollectionAction.beforeExecutions:
public final void beforeExecutions() throws CacheException {
// we need to obtain the lock before any actions are
// executed, since this may be an inverse="true"
// bidirectional association and it is one of the
// earlier entity actions which actually updates
// the database (this action is resposible for
// second-level cache invalidation only)
if ( persister.hasCache() ) {
final CacheKey ck = new CacheKey(
key,
persister.getKeyType(),
persister.getRole(),
session.getEntityMode(),
session.getFactory()
);
lock = persister.getCache().lock(ck, null);
}
}
Shouldn't "if ( persister.hasCache() )" be persistence.hasCache && getSession.getCacheMode.isPutEnabled(), or something along those lines?
--
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, 3 months
[Hibernate-JIRA] Created: (HHH-5000) duplicate words in the documents
by Strong Liu (JIRA)
duplicate words in the documents
--------------------------------
Key: HHH-5000
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5000
Project: Hibernate Core
Issue Type: Bug
Components: documentation
Reporter: Strong Liu
Priority: Minor
Fix For: 3.5.0.Next
localhost:documentation stliu$ find manual/src/main/docbook/en-US/ -name "*.xml" | xargs grep -E ' ([A-Za-z]+) +\1 '
manual/src/main/docbook/en-US//content/architecture.xml: model. This is also also known and used as <emphasis>session-per-request</emphasis>. The beginning
manual/src/main/docbook/en-US//content/performance.xml: timeouts is is very important that the cache timeout of the underlying
manual/src/main/docbook/en-US//content/portability.xml: <emphasis>logical</emphasis> function name to a a delegate which knows how to render
manual/src/main/docbook/en-US//content/query_sql.xml: <entry>All properties of the the collection</entry>
manual/src/main/docbook/en-US//content/session_api.xml: Newly instantiated instances of a a persistent class are considered
--
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, 3 months
[Hibernate-JIRA] Created: (HHH-4979) org.hibernate.test.hql.ASTParserLoadingTest failure running testCastInSelect with Ingres
by Ray Fan (JIRA)
org.hibernate.test.hql.ASTParserLoadingTest failure running testCastInSelect with Ingres
----------------------------------------------------------------------------------------
Key: HHH-4979
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4979
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR, Ingres 9.3.1 (int.lnx/106), Ingres9Dialect
Reporter: Ray Fan
Priority: Minor
Attachments: hql-astparserloadingtest.zip
Assertion failure executing testCastInSelect from org.hibernate.test.hql.ASTParserLoadingTest with Ingres.
{noformat}
<failure message="expected:<12.399999618530273> but was:<12.39>" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: expected:<12.399999618530273> but was:<12.39>;
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:282)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:71)
at org.hibernate.test.hql.ASTParserLoadingTest.testCastInSelect(ASTParserLoadingTest.java:1291)
</failure>{noformat}
The generated SQL from the HQL query taken from the output log is
{noformat}
08:17:30,536 DEBUG QueryTranslatorImpl:241 - HQL: select cast(bodyWeight as big_decimal) from org.hibernate.test.hql.Animal
08:17:30,536 DEBUG QueryTranslatorImpl:242 - SQL: select cast(animal0_.body_weight as decimal(19, 2)) as col_0_0_ from Animal animal0_
Hibernate:
select
cast(animal0_.body_weight as decimal(19,
2)) as col_0_0_
from
Animal animal0_
08:17:30,701 INFO SessionFactoryImpl:908 - closing
{noformat}
The returned value from the query with a decimal(19,2) target data type is correct.
--
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, 3 months
[Hibernate-JIRA] Created: (HHH-3899) Inconsistencies when processing changes to read-only and immutable entities
by Gail Badner (JIRA)
Inconsistencies when processing changes to read-only and immutable entities
---------------------------------------------------------------------------
Key: HHH-3899
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3899
Project: Hibernate Core
Issue Type: Bug
Reporter: Gail Badner
I've noticed that there are inconsistencies when read-only and immutable entities are modified. I've added some unit tests to org.hibernate.test.immutable.ImmutableTest and created org.hibernate.test.readonly.ReadOnlyVersionedNodesTest which show the inconsistencies.
The same behavior is seen in Branch_3_2, Branch_3_3, and trunk.
The inconsistencies in org.hibernate.test.immutable.ImmutableTest are:
ImmutableTest.testImmutable():
If an immutable entity with an immutable collection is associated with the session, an addition to the immutable collection is ignored
ImmutableTest.testImmutableCollectionWithUpdate:
If Session.update() is used to associate an immutable entity with an addition made to its immutable collection, then Hibernate detects that the reassociated entity has a dirty collection and HibernateException is thrown
ImmutableTest.testImmutableCollectionWithMerge:
If Session.merge() is used to associate an immutable entity with an addition made to its immutable collection, then, later when the transaction is committed, Hibernate detects that an immutable collection was changed and HibernateException is thrown
The inconsistencies in org.hibernate.test.readonly.ReadOnlyVersionedNodesTest are:
ReadOnlyVersionedNodesTest.testAddNewChildToReadOnlyParent():
If a read-only entity is associated with the session and a new child entity is added to collection, the new child entity is not persisted when the transaction is committed
ReadOnlyVersionedNodesTest.testUpdateParentWithNewChildCommitWithReadOnlyParent():
ReadOnlyVersionedNodesTest.testMergeDetachedParentWithNewChildCommitWithReadOnlyParent():
ReadOnlyVersionedNodesTest.testGetParentMakeReadOnlyThenMergeDetachedParentWithNewChildC():
If Session.merge() or Session.update() is used to associate a parent entity with a new child entity in its collection, and that parent entity is made read-only, then, later when the transaction is committed, the new child entity is persisted and it is associated with the parent
ReadOnlyVersionedNodesTest.testAddNewParentToReadOnlyChild():
If a read-only entity is associated with the session and a new parent entity is assigned, the new parent entity is not persisted when the transaction is committed
ReadOnlyVersionedNodesTest.testUpdateChildWithNewParentCommitWithReadOnlyChild():
If Session.update() is used to associate a child entity with a new parent entity, and the child entity is made read-only, later, when the transaction is committed, the new parent entity is persisted, but it is not associated with the child
ReadOnlyVersionedNodesTest.testMergeDetachedChildWithNewParentCommitWithReadOnlyChild():
ReadOnlyVersionedNodesTest.testGetChildMakeReadOnlyThenMergeDetachedChildWithNewParent():
If Session.merge() is used to associate a child entity with a new parent entity, and the child entity is made read-only, later, when the transaction is committed, the new parent entity is persisted, but it is not associated with the child; in addition the version on the parent is incremented.
If any of these results appear to be due to a bug, the test name should be changed to end in FailureExpected until the bug is fixed.
--
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, 3 months