[Hibernate-JIRA] Created: (HHH-3490) replicate breaks an object's collections in the destination session if they were not initialized in the source session
by Renat Akhmerov (JIRA)
replicate breaks an object's collections in the destination session if they were not initialized in the source session
----------------------------------------------------------------------------------------------------------------------
Key: HHH-3490
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3490
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Hibernate 3.3.1, PostgreSQL 8.3.1
Reporter: Renat Akhmerov
We have a class mapped with hibernate which has a lazily loaded collection. When we try to replicate an object of this class with existing associated collection items to another database hibernate removes collection items in the destination database for this object in the case if the collection has not been initialized in the scope of source session. Is this correct behavior or is this a bug?
The mapping is:
<hibernate-mapping package="paysys.domain">
<class name="Service" table="SERVICE">
..............
<set name="operationClasses" table="OPERATION_CLASSES">
<key column="SERVICE_ID" />
<element column="CLASS" type="class" />
</set>
...........
</class>
Actually this happens for seemingly any collection type, for instance, list.
Please, note if you need more explanations on this issue.
--
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, 6 months
[Hibernate-JIRA] Created: (ANN-776) While creating Many to One relationship in superclass using inheritance
by SATISH K R YERUVA (JIRA)
While creating Many to One relationship in superclass using inheritance
-----------------------------------------------------------------------
Key: ANN-776
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-776
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.2.1
Environment: Red hat Linux + Netbeans
Reporter: SATISH K R YERUVA
I have encountered the issue for creating a many to one relation ship. could you please check below error . This is same bug like ANN-376
http://opensource.atlassian.com/projects/hibernate/browse/ANN-376?page=co...
In this error the status is duplicate, but no one mention where it was solved.
fe use of the session)
[java] org.hibernate.AssertionFailure: Table XXXXXXXXXXX not found
[java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:458)
[java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:237)
[java] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
[java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
[java] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
[java] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
[java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
[java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:458)
[java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:237)
[java] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
[java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
[java] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
[java] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
[java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
[java] at co
It is creating a table. There was no problem with creating a table or connection
--
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, 6 months
[Hibernate-JIRA] Created: (HBX-1088) Custom ReverseEngineeringStrategy class not loaded in Eclipse 3.4 Ganymede when project uses JDK 6
by Rich Taylor (JIRA)
Custom ReverseEngineeringStrategy class not loaded in Eclipse 3.4 Ganymede when project uses JDK 6
--------------------------------------------------------------------------------------------------
Key: HBX-1088
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1088
Project: Hibernate Tools
Issue Type: Bug
Components: reverse-engineer
Affects Versions: 3.2.2
Environment: Hibernate Tools 3.2.2 Nightly from 9/10/2008
OSX Leopard 10.5.4
Eclipse 3.4 Ganymede
Eclipse Project: WTP 3.0 EJB Project, set to use Java 6
Java 1.6.0_05-b13-52 64bit (Mac OSX)
MySQl 5.1.26
Reporter: Rich Taylor
Priority: Minor
When trying to execute a hibernate tools generation in Eclipse Ganymede with a custom ReverseEngineeringStrategy class, the class cannot be found by hibernate tools. I only get this error when the project is set to use JDK 6. If I lower it to JDK 5 the issue goes away. Here is the resulting stack trace when executing the generation:
org.hibernate.console.HibernateConsoleRuntimeException: Could not create or find com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy with one argument delegate constructor
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:358)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:339)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:303)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:283)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:216)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:136)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880)
at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:966)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:341)
... 12 more
!SUBENTRY 1 org.hibernate.eclipse.console 4 666 2008-09-10 15:02:02.570
!MESSAGE java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy
!STACK 0
java.lang.ClassNotFoundException: com.mycompany.hibernate.SimpleCustomReverseEngineeringStrategy
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.loadreverseEngineeringStrategy(CodeGenerationLaunchDelegate.java:341)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:339)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:303)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:283)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:216)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:136)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:880)
at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:966)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
See here for more information:
http://forum.hibernate.org/viewtopic.php?p=2395107#2395107
--
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, 6 months
[Hibernate-JIRA] Created: (HHH-2254) A query validation bug produces QueryException: "Expected positional parameter count: 1, actual parameters: [Parent@bec357b] [from Child this where this.id.parent = ?]"
by Hernan Liendo (JIRA)
A query validation bug produces QueryException: "Expected positional parameter count: 1, actual parameters: [Parent@bec357b] [from Child this where this.id.parent = ?]"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-2254
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2254
Project: Hibernate3
Type: Bug
Components: query-hql
Versions: 3.2.0.ga
Environment: Hibernate 3.2 using Sybase. However this is not an environment caused problem. It's supposed to happen in every environment.
Reporter: Hernan Liendo
-- Short description ============================================================================ --
A query validation bug produces QueryException: "Expected positional parameter count: 1, actual parameters: [Parent@bec357b] [from Child this where this.id.parent = ?].
Both Parent and Child use composite keys.
-- Context ====================================================================================== --
Having composite keys for a Parent class and a Child class, I want to retrieve childs that belong to an specific Parent.
-- Parent Definition ============================================================================ --
public class Parent {
public ParentId ParentId;
...
}
public class ParentId {
private String idField1;
private int idField2;
...
}
// the parent mapping
<hibernate-mapping>
<class mutable="false" table="xx" name="Parent">
<composite-id class="ParentId" access="field" name="parentId">
<key-property column="idField1" access="field" name="idField1"/>
<key-property column="idField2" access="field" name="idField2"/>
</composite-id>
</class>
</hibernate-mapping>
-- Child Definition ============================================================================ --
public class Child {
public ChildId childId;
...
}
public class ChildId {
public Parent parent;
public String aditionalIdField;
...
}
// the mapping
<hibernate-mapping>
<class mutable="false" table="yyy" name="Child">
<composite-id class="ChildId" access="field" name="childId">
<key-many-to-one name="parent" class="Parent" access="field">
<column name="idField1" not-null="true" />
<column name="idField2" not-null="true" />
</key-many-to-one>
<key-property column="aditionalIdField" access="field" name="aditionalIdField"/>
</composite-id>
</class>
</hibernate-mapping>
-- HQL Statement ============================================================================ --
from Child this where this.childId.parent = ?
or
from Child this where this.id.parent = ? // using aliased id
-- The Exception ============================================================================ --
org.hibernate.QueryException: Expected positional parameter count: 1, actual parameters: [Parent@bec357b] [from Child this where this.childId.parent = ?]
at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:319)
at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:275)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:75)
...
-- The Problem ============================================================================ --
class: org.hibernate.impl.AbstractQueryImpl
method: protected void verifyParameters(boolean reserveFirstParameter) throws HibernateException
line: 286
The method validates parameters. It resolves the "positionalValueSpan" variable witch in my case gets the value of 2 (One for parent's idField1 and the other for parent's idField2).
The method compares positionalValueSpan (2) with parameterMetadata.getOrdinalParameterCount() witch it is 1 (the quantity of "?" signs in the HQL statement".
This bug only happens when:
1. composed keys are used (and)
2. having a parent-child relationship (and)
3. resolving children from certain parent.
-- Hibernate user workaround ============================================================================ --
Not to use a parent instance variable in the Child class.
Hope this helps. If you guys need the source code in order to check the bug, please let me know it. Good luck!
Hernan
--
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, 6 months
[Hibernate-JIRA] Commented: (HHH-1435) many-to-one lazy seems to be broken in 3.1.x
by Will Hoover (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1435?page=c... ]
Will Hoover commented on HHH-1435:
----------------------------------
This issue has been resolved, but we are still seeing it in 3.2.6
> many-to-one lazy seems to be broken in 3.1.x
> --------------------------------------------
>
> Key: HHH-1435
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1435
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1.2
> Reporter: Frank Grimes
> Assignee: Steve Ebersole
> Priority: Critical
> Fix For: 3.2.0.alpha2, 3.1.3
>
>
> When trying to upgrade from hibernate-3.0.5 to hibernate-3.1.1, my many-to-one lazy associations stopped working. (they're being fetched right away)
> I noticed that the test for that functionality in org.hibernate.test.instrument.InstrumentTest was commented out at some point during 3.1 development.
> If I uncomment the assertion for the lazy loading of the many-to-one association, the test fails.
> The line in question is the following (line 160):
> //assertFalse(Hibernate.isPropertyInitialized(doc, "owner"));
> If this is/was a known issue, I didn't find any mention of it in either the forums or JIRA.
> It seems that both lazy="no-proxy" and lazy="proxy" fail on that test. (I tried modifying the mapping to see if maybe lazy="proxy" could be a possible migration path from the old lazy="true")
> Are there any plans to fix many-to-one lazy associations?
> FYI, I originally brought this issue up on the forums last week with no reply, hence the creation of this JIRA issue:
> http://forum.hibernate.org/viewtopic.php?t=954713
> 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
17 years, 6 months
[Hibernate-JIRA] Commented: (EJB-6) Support ?1, ?2 style positional parameters
by payne (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-6?page=com.... ]
payne commented on EJB-6:
-------------------------
http://templora.com/index.php/topic,793.0.html
http://templora.com/index.php/topic,792.0.html
http://templora.com/index.php/topic,791.0.html
http://templora.com/index.php/topic,790.0.html
http://templora.com/index.php/topic,789.0.html
http://templora.com/index.php/topic,788.0.html
http://templora.com/index.php/topic,787.0.html
http://templora.com/index.php/topic,786.0.html
http://templora.com/index.php/topic,785.0.html
http://templora.com/index.php/topic,784.0.html
http://templora.com/index.php/topic,783.0.html
http://templora.com/index.php/topic,782.0.html
http://templora.com/index.php/topic,781.0.html
http://templora.com/index.php/topic,780.0.html
http://templora.com/index.php/topic,779.0.html
http://templora.com/index.php/topic,778.0.html
http://templora.com/index.php/topic,777.0.html
http://templora.com/index.php/topic,776.0.html
http://templora.com/index.php/topic,775.0.html
http://templora.com/index.php/topic,774.0.html
http://templora.com/index.php/topic,773.0.html
http://templora.com/index.php/topic,772.0.html
http://templora.com/index.php/topic,771.0.html
http://templora.com/index.php/topic,770.0.html
http://templora.com/index.php/topic,769.0.html
http://templora.com/index.php/topic,768.0.html
http://templora.com/index.php/topic,767.0.html
http://templora.com/index.php/topic,766.0.html
http://templora.com/index.php/topic,765.0.html
http://templora.com/index.php/topic,764.0.html
http://templora.com/index.php/topic,763.0.html
http://templora.com/index.php/topic,762.0.html
http://templora.com/index.php/topic,761.0.html
http://templora.com/index.php/topic,760.0.html
http://templora.com/index.php/topic,759.0.html
http://templora.com/index.php/topic,758.0.html
http://templora.com/index.php/topic,757.0.html
http://templora.com/index.php/topic,756.0.html
http://templora.com/index.php/topic,755.0.html
http://templora.com/index.php/topic,754.0.html
http://templora.com/index.php/topic,753.0.html
http://templora.com/index.php/topic,752.0.html
http://templora.com/index.php/topic,751.0.html
http://templora.com/index.php/topic,750.0.html
http://templora.com/index.php/topic,749.0.html
http://templora.com/index.php/topic,748.0.html
http://templora.com/index.php/topic,747.0.html
http://templora.com/index.php/topic,746.0.html
http://templora.com/index.php/topic,745.0.html
http://templora.com/index.php/topic,744.0.html
http://templora.com/index.php/topic,743.0.html
http://templora.com/index.php/topic,742.0.html
http://templora.com/index.php/topic,741.0.html
http://templora.com/index.php/topic,740.0.html
http://templora.com/index.php/topic,739.0.html
http://templora.com/index.php/topic,738.0.html
http://templora.com/index.php/topic,737.0.html
http://templora.com/index.php/topic,736.0.html
http://templora.com/index.php/topic,735.0.html
http://templora.com/index.php/topic,734.0.html
http://templora.com/index.php/topic,733.0.html
http://templora.com/index.php/topic,732.0.html
http://templora.com/index.php/topic,731.0.html
http://templora.com/index.php/topic,730.0.html
http://templora.com/index.php/topic,729.0.html
http://templora.com/index.php/topic,728.0.html
http://templora.com/index.php/topic,727.0.html
http://templora.com/index.php/topic,726.0.html
http://templora.com/index.php/topic,725.0.html
http://templora.com/index.php/topic,724.0.html
http://templora.com/index.php/topic,723.0.html
http://templora.com/index.php/topic,722.0.html
http://templora.com/index.php/topic,721.0.html
http://templora.com/index.php/topic,720.0.html
http://templora.com/index.php/topic,719.0.html
http://templora.com/index.php/topic,718.0.html
http://templora.com/index.php/topic,717.0.html
http://templora.com/index.php/topic,716.0.html
http://templora.com/index.php/topic,715.0.html
http://templora.com/index.php/topic,714.0.html
http://templora.com/index.php/topic,713.0.html
http://templora.com/index.php/topic,712.0.html
http://templora.com/index.php/topic,711.0.html
http://templora.com/index.php/topic,710.0.html
http://templora.com/index.php/topic,709.0.html
http://templora.com/index.php/topic,708.0.html
http://templora.com/index.php/topic,707.0.html
http://templora.com/index.php/topic,706.0.html
http://templora.com/index.php/topic,705.0.html
http://templora.com/index.php/topic,704.0.html
http://templora.com/index.php/topic,703.0.html
http://templora.com/index.php/topic,702.0.html
http://templora.com/index.php/topic,701.0.html
http://templora.com/index.php/topic,700.0.html
http://templora.com/index.php/topic,699.0.html
http://templora.com/index.php/topic,698.0.html
http://templora.com/index.php/topic,697.0.html
http://templora.com/index.php/topic,696.0.html
http://templora.com/index.php/topic,695.0.html
http://templora.com/index.php/topic,694.0.html
> Support ?1, ?2 style positional parameters
> ------------------------------------------
>
> Key: EJB-6
> URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-6
> Project: Hibernate Entity Manager
> Issue Type: Bug
> Components: EntityManager
> Reporter: Gavin King
> Assignee: Emmanuel Bernard
> Priority: Minor
> Fix For: 3.1beta3
>
>
> Currently, Hibernate supports :name, but not ?1.
--
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, 6 months