[Hibernate-JIRA] Commented: (HHH-1367) warn level log "this operation breaks ==" may be disturbing
by Ed Shirey (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1367?page=c... ]
Ed Shirey commented on HHH-1367:
--------------------------------
Noticed when attempting to deploy this that the class name in the note above does not correspond to the class name in the current distribution.
The correct logger name is:
"org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog"
Note the "Persistence" instead of "Persistent". This is easily identified with some basic troubleshooting, but thought I'd try and save someone the 15 minutes.
> warn level log "this operation breaks ==" may be disturbing
> -----------------------------------------------------------
>
> Key: HHH-1367
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1367
> Project: Hibernate3
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1
> Environment: 3.1, oracle 9
> Reporter: Peter Mutsaers
> Assignee: Steve Ebersole
> Priority: Minor
> Fix For: 3.1.2
>
>
> The ref. manual 19.1.3 warns that a proxy may break ==. This is fine and understood, however the org.hibernate.engine.StatefulPersistenceContext class emits a commons-logging warning for this.
> We have such a case in productive code, we know it may break == and understand the consequences. However it is irritating that this warning is generated at runtime.
> The code which emits this warning is executed very often (in a batch process). We do not want to generally disable the warning log level, but we don't want our logfiles to get filled with this warning either.
> Since this class only generates this warning log (no other warn() case) we can disable the warn level for the class for now, as a work around.
> IMHO a case that may be normal (even if you have to take care) should not continue to generate such warnings. It is not a case we can avoid, we have to access the class once as superclass, and later in the same session as the subclass.
--
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
17 years, 2 months
[Hibernate-JIRA] Commented: (HHH-1780) negation of EXISTS in hql query does not work
by Nikolaus Rumm (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1780?page=c... ]
Nikolaus Rumm commented on HHH-1780:
------------------------------------
Same here.
We found the bug because Hibernate optimizes HQL queries by applying De Morgan's laws.
from Table t where not ( t.name is null and exists(select r.oid from Table r))
->
select .... from table table_1 where table_1.name is not null or exists(select table_2.oid from table table_2)
The exists clause is not inverted.
> negation of EXISTS in hql query does not work
> ---------------------------------------------
>
> Key: HHH-1780
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1780
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.1.3, 3.2.0 cr1, 3.2.0.cr2
> Reporter: Marton Papp
>
> Hello!
> I think I found a bug in Hibernate, in class org.hibernate.hql.ast.HqlParser.
> It is in the methtod:
> public AST negateNode(AST x)
> The switch lacks the node type: EXISTS.
> The default negateNode() implementation in org.hibernate.hql.antlr.HqlBaseParser seems to be broken by me, since it does not actually inverts the node but returns a node that is inverted. Or, to be more exact, the negation of OR and AND types are buggy, since they seem to assume that negateNode() will change the node itself, and so they simply discard its return value.
> I wish the branch for NOT was not commented out, since it would provide a workaround, but now i'm stuck.
> Regards,
> Marton
--
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
17 years, 2 months
[Hibernate-JIRA] Created: (HBX-965) conditionally exclude catalog in H2MetaDataDialect
by Dan Allen (JIRA)
conditionally exclude catalog in H2MetaDataDialect
--------------------------------------------------
Key: HBX-965
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-965
Project: Hibernate Tools
Issue Type: Improvement
Components: reverse-engineer
Affects Versions: 3.2beta10
Environment: H2 1.0 (2007-06-17) and H2 1.0 (2007-07-12)
Reporter: Dan Allen
Priority: Minor
Prior to build 55 (aka version 1.0 2007-07-12), the H2 database did not understand a query that included the catalog name. For instance, if you had a table called EMPLOYEE in the PUBLIC schema, H2.PUBLIC.EMPLOYEE would not work. After build 55, H2 understands this query.
However, this brings up a different issue. You cannot create catalogs in H2, so really the H2 catalog is just a bogus place holder. That has to make you wonder if putting the catalog in the reverse engineering dialect is even wise. It makes the hbm2java generated classes very non-portable. This debate is a bit of a fuzzy area for me.
--
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
17 years, 2 months
[Hibernate-JIRA] Commented: (HHH-1852) @MappedSuperclass - PropertyAccessException
by Bas van den Berg (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1852?page=c... ]
Bas van den Berg commented on HHH-1852:
---------------------------------------
I had the same error, but not in combination of MappedSuperClass.
I have a generic Tree object which is not hibernated,
public class Tree<T>
In my code I use a tree of words i.e. Tree<Word>. To be able to hibernate this, I extended the Tree object, like this.
public class WordTree extends Tree<Word>
Then I added the mapping information on the methods i.e. @AccessType("property")
Everything worked, but then I got an error at runtime error 'could not get a field value by reflection getter of Word.id'
I found out that the targettype was incorrect in WordTree. After changing it, the error went away.
@OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.EAGER, targetEntity=WordTree.class)
@JoinTable(name = "Child",
joinColumns = @JoinColumn(name="node_id"),
inverseJoinColumns = @JoinColumn(name="child_id")
)
public List<Tree<Word>> getChilds() {
return super.getChilds();
}
I hope this will give the experts some more clues on where to look.
> @MappedSuperclass - PropertyAccessException
> -------------------------------------------
>
> Key: HHH-1852
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1852
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.0.cr2
> Environment: hibernate-3.2.0.cr2, hibernate-annotations-3.2.0.cr1, hibernate-entitymanager-3.2.0.cr1
> Reporter: David de Mingo
> Attachments: src.zip
>
>
> Caused by: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of org.endea.model.product.ProductAttribute.data
> at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:35)
> at org.hibernate.property.DirectPropertyAccessor$DirectGetter.getForInsert(DirectPropertyAccessor.java:40)
> at org.hibernate.tuple.AbstractEntityTuplizer.getPropertyValuesToInsert(AbstractEntityTuplizer.java:264)
> ...
> Caused by: java.lang.IllegalArgumentException
> at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
> at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
> at java.lang.reflect.Field.get(Field.java:357)
> at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:32)
> ... 41 morer
--
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
17 years, 2 months
[Hibernate-JIRA] Created: (HBX-996) hbm2java duplicates the property(s) referenced in the <properties> element
by Keith Lewandowski (JIRA)
hbm2java duplicates the property(s) referenced in the <properties> element
---------------------------------------------------------------------------
Key: HBX-996
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-996
Project: Hibernate Tools
Issue Type: Bug
Components: hbm2java
Affects Versions: 3.2.beta11
Environment: hibernate 3.2.4.sp1, Oracle 10g
Reporter: Keith Lewandowski
I need to specify 2 composite unique constraints that overlap on a column.
I attempted to map this by:
--------------------------------------
<property name="first" .../>
<property name="second" .../>
<propery name="third" .../>
<properties unique="true">
<property name="first"/>
<property name="second"/>
</properties>
<properties unique="true">
<property name="second"/>
<property name="third"/>
</properties>
------------------------------------
I expected this mapping to use the original definition of the property. If it doesn't there is no way to specify overlapping composite unique constraints. The beta9a version of hbm2ddl handled this correctly, but the hbm2java would only generate data members for the property(s) enclosed in the properties element.
Now hbm2ddl duplicates the columns and hbm2java duplicates the data members.
--
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
17 years, 2 months