[Hibernate-JIRA] Created: (HHH-4757) nextTimestamp not precise enough for Infinispan 2LC
by Galder Zamarreno (JIRA)
nextTimestamp not precise enough for Infinispan 2LC
---------------------------------------------------
Key: HHH-4757
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4757
Project: Hibernate Core
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.5.0-Beta-2
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
Fix For: 3.5
oing some tests we discovered that with Infinispan cached querys are not recognized as UpToDate
when the query call (= the chache put) happens within 100ms after the last UpdateTimestamps invalidation.
This is because Infinispan defines a rather low timestamp granular precision, indeed ehcache's precision goes into milliseconds.
InfinispanRegionFactory.java:
public long nextTimestamp() {
return System.currentTimeMillis() / 100;
}
EHCache-TimeStamper:
public static long next() {
synchronized(Timestamper.class) {
long newTime = System.currentTimeMillis() << BIN_DIGITS;
if (time<newTime) {
time = newTime;
counter = 0;
}
else if (counter < ONE_MS - 1 ) {
counter++;
}
return time + counter;
}
}
regards
G.D.
--
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
16 years, 3 months
[Hibernate-JIRA] Created: (HHH-4087) Session.flush() Causes AssertionFailure
by Brian (JIRA)
Session.flush() Causes AssertionFailure
----------------------------------------
Key: HHH-4087
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4087
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.4.sp1
Reporter: Brian
After calling Session.save() with an entity, calling Session.flush() causes the following error.
org.hibernate.AssertionFailure: collection [com.example.myList] was not processed by flush()
at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205)
at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
The mapping used was:
<component name="component" class="Component">
<property name="sequence" column="SEQUENCE" not-null="false" generated="insert"/>
<list name="myList" table="MY_LIST">
<key column="MY_LIST_KEY"/>
<index column="INDEX_COL"/>
<composite-element class="MyCompositeElement">
<property name="element" column="ELEMENT"/>
</composite-element>
</list>
</component>
--
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
16 years, 3 months
[Hibernate-JIRA] Created: (HHH-4701) ORA-00920: invalid relational operator using subquery
by Julien HENRY (JIRA)
ORA-00920: invalid relational operator using subquery
-----------------------------------------------------
Key: HHH-4701
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4701
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Beta-2
Environment: Oracle 9i
Reporter: Julien HENRY
I have the following relations:
A*---B*---C
All my tables are using composite keys.
I want to delete all A in relation to a specific C entity.
My query is:
delete from A a where a in (select a1 from A a1 left join a1.b b left join b.c c where c.compositeId=:cId)
The resulting Oracle query is something like:
delete from A where (A_1, A_2) in (select (A_1, A_2) from A a1, B b1, C c1 where [...])
which produce the following error:
ORA-00920: invalid relational operator
I tried to fix the SQL query by removing parenthesis:
delete from A where (A_1, A_2) in (select A_1, A_2 from A a1, B b1, C c1 where [...])
which now give the following error:
ORA-00918: column ambiguously defined
And finally I arrived to a correct quesry by adding table prefix:
delete from A where (A_1, A_2) in (select a1.A_1, a1.A_2 from A a1, B b1, C c1 where [...])
I will try to create a test case. Is there any documentation on how to provide test case?
Regards
--
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
16 years, 3 months
[Hibernate-JIRA] Created: (HHH-3590) Having @version in Parent causes wrong HQL update when updating subclass in Joined Subclass Inheritance Strategy.
by Rachit (JIRA)
Having @version in Parent causes wrong HQL update when updating subclass in Joined Subclass Inheritance Strategy.
-----------------------------------------------------------------------------------------------------------------
Key: HHH-3590
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3590
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.3.1
Environment: Java 1.5 , Oracle 10g , Hibernate 3.3.1.GA
Reporter: Rachit
Priority: Blocker
A very simple joined subclass strategy implemented.
2 classes: Employee(parent/superclass) and Person( child/subclass)
Employee has @Version defined on column ROW_VERSION and Person extends Employee using Joined Inheritance Strategy. Person has PERSON_ID as PK and Employee has EMPLOYEE_ID as PK. I also have @PrimaryKeyJoinColumn(name = "PERSON_ID", referencedColumnName = "EMPLOYEE_ID") for obvious reason.
Now if I update any attribute in Child class i.e Person.setVIPFlag("Y") , hibernate fires an update query on Parent entity with wrong column name in hql. In this case the query would be "update EMPLOYEE set ROW_VERSION=? where PERSON_ID=? and ROW_VERSION=?". This query fails as EMPLOYEE does not have PERSON_ID.
The moment I remove @Version annotation from Parent(Employee) class, there is no update ( as expected ) and hence no error, but this is not an acceptable solution.
Thanking in anticipation.
--
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
16 years, 3 months