[Hibernate-JIRA] Created: (ANN-627) Eager ManyToOne relationship does not work using annotations
by George Gastaldi (JIRA)
Eager ManyToOne relationship does not work using annotations
------------------------------------------------------------
Key: ANN-627
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-627
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.2.0.ga
Environment: Oracle 10g environment.
Reporter: George Gastaldi
Attachments: Entities.zip, hibernate.cfg.xml
The FetchMode.JOIN is not working for ManyToOne relationships.
Using:
session.createQuery("from OrigemVO obj").list();
produces:
Hibernate:
select
origemvo0_.CD_ORIGEM as CD1_1_,
origemvo0_.VERSAO as VERSAO1_,
origemvo0_.DT_ALTERACAO as DT3_1_,
origemvo0_.NM_USUARIO as NM4_1_,
origemvo0_.DS_ORIGEM as DS5_1_,
origemvo0_.SG_UF as SG6_1_,
origemvo0_.CD_JURISDICAO as CD9_1_,
origemvo0_.COD_TST as COD7_1_,
origemvo0_.COD_IBGE as COD8_1_
from
JCOMPANY.ORIGENS origemvo0_
where
origemvo0_.CD_ORIGEM=304
Hibernate:
select
jurisdicao0_.CD_JURISDICAO as CD1_0_0_,
jurisdicao0_.DS_JURISDICAO as DS2_0_0_
from
JCOMPANY.JURISDICAO jurisdicao0_
where
jurisdicao0_.CD_JURISDICAO=?
whether It should be:
select
this_.CD_ORIGEM as CD1_1_1_,
this_.VERSAO as VERSAO1_1_,
this_.DT_ALTERACAO as DT3_1_1_,
this_.NM_USUARIO as NM4_1_1_,
this_.DS_ORIGEM as DS5_1_1_,
this_.SG_UF as SG6_1_1_,
this_.CD_JURISDICAO as CD9_1_1_,
this_.COD_TST as COD7_1_1_,
this_.COD_IBGE as COD8_1_1_,
jurisdicao2_.CD_JURISDICAO as CD1_0_0_,
jurisdicao2_.DS_JURISDICAO as DS2_0_0_
from
JCOMPANY.ORIGENS this_
inner join
JCOMPANY.JURISDICAO jurisdicao2_
on this_.CD_JURISDICAO=jurisdicao2_.CD_JURISDICAO
Classes and hibernate.cfg.xml attached.
It works when using:
session.createCriteria(OrigemVO.class).list();
--
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-430) @ManyToOne results in default outer join eager fetch, should be lazy
by Christian Bauer (JIRA)
@ManyToOne results in default outer join eager fetch, should be lazy
--------------------------------------------------------------------
Key: ANN-430
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-430
Project: Hibernate Annotations
Type: Bug
Components: documentation, binder
Reporter: Christian Bauer
Documentation says:
<sect3>
<title>Association fetching</title>
<para>You have the ability to either eagerly or lazily fetch
associated entities. The <literal>fetch</literal> parameter can be set
to <literal>FetchType.LAZY</literal> or
<literal>FetchType.EAGER</literal>. <literal>EAGER</literal> will try
to use an outer join select to retrieve the associated object, while
<literal>LAZY</literal> is the default and will only trigger a select
when the associated object is accessed for the first time. EJBQL also
has a <literal>fetch</literal> keyword that allows you to override
laziness when doing a particular query. This is very useful to improve
performance and is decided on a use case to use case basis.</para>
</sect3>
However, a simple @ManyToOne without any other attributes results in an eager join outer fetch.
--
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-629) Eager ManyToOne relationship does not work using annotations
by George Gastaldi (JIRA)
Eager ManyToOne relationship does not work using annotations
------------------------------------------------------------
Key: ANN-629
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-629
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.2.0.ga
Environment: Oracle 10g environment.
Reporter: George Gastaldi
Attachments: Entities.zip, hibernate.cfg.xml
The FetchMode.JOIN is not working for ManyToOne relationships.
Using:
session.createQuery("from OrigemVO obj").list();
produces:
Hibernate:
select
origemvo0_.CD_ORIGEM as CD1_1_,
origemvo0_.VERSAO as VERSAO1_,
origemvo0_.DT_ALTERACAO as DT3_1_,
origemvo0_.NM_USUARIO as NM4_1_,
origemvo0_.DS_ORIGEM as DS5_1_,
origemvo0_.SG_UF as SG6_1_,
origemvo0_.CD_JURISDICAO as CD9_1_,
origemvo0_.COD_TST as COD7_1_,
origemvo0_.COD_IBGE as COD8_1_
from
JCOMPANY.ORIGENS origemvo0_
where
origemvo0_.CD_ORIGEM=304
Hibernate:
select
jurisdicao0_.CD_JURISDICAO as CD1_0_0_,
jurisdicao0_.DS_JURISDICAO as DS2_0_0_
from
JCOMPANY.JURISDICAO jurisdicao0_
where
jurisdicao0_.CD_JURISDICAO=?
whether It should be:
select
this_.CD_ORIGEM as CD1_1_1_,
this_.VERSAO as VERSAO1_1_,
this_.DT_ALTERACAO as DT3_1_1_,
this_.NM_USUARIO as NM4_1_1_,
this_.DS_ORIGEM as DS5_1_1_,
this_.SG_UF as SG6_1_1_,
this_.CD_JURISDICAO as CD9_1_1_,
this_.COD_TST as COD7_1_1_,
this_.COD_IBGE as COD8_1_1_,
jurisdicao2_.CD_JURISDICAO as CD1_0_0_,
jurisdicao2_.DS_JURISDICAO as DS2_0_0_
from
JCOMPANY.ORIGENS this_
inner join
JCOMPANY.JURISDICAO jurisdicao2_
on this_.CD_JURISDICAO=jurisdicao2_.CD_JURISDICAO
Classes and hibernate.cfg.xml attached.
It works when using:
session.createCriteria(OrigemVO.class).list();
--
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-628) Eager ManyToOne relationship does not work using annotations
by George Gastaldi (JIRA)
Eager ManyToOne relationship does not work using annotations
------------------------------------------------------------
Key: ANN-628
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-628
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.2.0.ga
Environment: Oracle 10g environment.
Reporter: George Gastaldi
Attachments: Entities.zip, hibernate.cfg.xml
The FetchMode.JOIN is not working for ManyToOne relationships.
Using:
session.createQuery("from OrigemVO obj").list();
produces:
Hibernate:
select
origemvo0_.CD_ORIGEM as CD1_1_,
origemvo0_.VERSAO as VERSAO1_,
origemvo0_.DT_ALTERACAO as DT3_1_,
origemvo0_.NM_USUARIO as NM4_1_,
origemvo0_.DS_ORIGEM as DS5_1_,
origemvo0_.SG_UF as SG6_1_,
origemvo0_.CD_JURISDICAO as CD9_1_,
origemvo0_.COD_TST as COD7_1_,
origemvo0_.COD_IBGE as COD8_1_
from
JCOMPANY.ORIGENS origemvo0_
where
origemvo0_.CD_ORIGEM=304
Hibernate:
select
jurisdicao0_.CD_JURISDICAO as CD1_0_0_,
jurisdicao0_.DS_JURISDICAO as DS2_0_0_
from
JCOMPANY.JURISDICAO jurisdicao0_
where
jurisdicao0_.CD_JURISDICAO=?
whether It should be:
select
this_.CD_ORIGEM as CD1_1_1_,
this_.VERSAO as VERSAO1_1_,
this_.DT_ALTERACAO as DT3_1_1_,
this_.NM_USUARIO as NM4_1_1_,
this_.DS_ORIGEM as DS5_1_1_,
this_.SG_UF as SG6_1_1_,
this_.CD_JURISDICAO as CD9_1_1_,
this_.COD_TST as COD7_1_1_,
this_.COD_IBGE as COD8_1_1_,
jurisdicao2_.CD_JURISDICAO as CD1_0_0_,
jurisdicao2_.DS_JURISDICAO as DS2_0_0_
from
JCOMPANY.ORIGENS this_
inner join
JCOMPANY.JURISDICAO jurisdicao2_
on this_.CD_JURISDICAO=jurisdicao2_.CD_JURISDICAO
Classes and hibernate.cfg.xml attached.
It works when using:
session.createCriteria(OrigemVO.class).list();
--
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-2695) Hibernate 3.2.4 Transaction Lookup is failing
by Guy (JIRA)
Hibernate 3.2.4 Transaction Lookup is failing
---------------------------------------------
Key: HHH-2695
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2695
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.4
Environment: JOTM + Tomcat 5.5.23 + Hibernate 3.2.4
Reporter: Guy
We upgraded Hibernate from version 3.1.3 to version 3.2.4. Creating the connection and transaction worked using 3.1.3 although when upgrading using Hibernate 3.2.4 it fails creating the transaction.
org.hibernate.TransactionException: Unable to locate UserTransaction to check status
at org.hibernate.transaction.JTATransactionFactory.isTransactionInProgress(JTATransactionFactory.java:102)
at org.hibernate.jdbc.JDBCContext.isTransactionInProgress(JDBCContext.java:187)
at org.hibernate.impl.SessionImpl.isTransactionInProgress(SessionImpl.java:369)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:962)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.vangenechten.infrastructure.services.resources.WfDataDAO.getAllParentWfData(WfDataDAO.java:175)
at com.vangenechten.infrastructure.services.service.WfDataServiceImpl.getAllParentWfData(WfDataServiceImpl.java:
161)
at com.vangenechten.workflow.cic.workflow.shark.service.WorkflowProcessor.getHowManyConfiguration(WorkflowProces
sor.java:109)
at com.vangenechten.workflow.cic.workflow.shark.service.WorkflowProcessor.execute(WorkflowProcessor.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.hibernate.transaction.JTATransactionFactory.isTransactionInProgress(JTATransactionFactory.java:98)
--
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-2693) JOTM and Hibernate 3.2.4 is failing
by Guy (JIRA)
JOTM and Hibernate 3.2.4 is failing
-----------------------------------
Key: HHH-2693
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2693
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.4
Environment: JOTM + Tomcat 5.5.23 + Hibernate 3.2.4
Reporter: Guy
We upgraded Hibernate from version 3.1.3 to version 3.2.4. Creating the connection and transaction worked using 3.1.3 although when upgrading using Hibernate 3.2.4 it fails creating the transaction.
org.hibernate.TransactionException: Unable to locate UserTransaction to check status
at org.hibernate.transaction.JTATransactionFactory.isTransactionInProgress(JTATransactionFactory.java:102)
at org.hibernate.jdbc.JDBCContext.isTransactionInProgress(JDBCContext.java:187)
at org.hibernate.impl.SessionImpl.isTransactionInProgress(SessionImpl.java:369)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:962)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.vangenechten.infrastructure.services.resources.WfDataDAO.getAllParentWfData(WfDataDAO.java:175)
at com.vangenechten.infrastructure.services.service.WfDataServiceImpl.getAllParentWfData(WfDataServiceImpl.java:
161)
at com.vangenechten.workflow.cic.workflow.shark.service.WorkflowProcessor.getHowManyConfiguration(WorkflowProces
sor.java:109)
at com.vangenechten.workflow.cic.workflow.shark.service.WorkflowProcessor.execute(WorkflowProcessor.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.hibernate.transaction.JTATransactionFactory.isTransactionInProgress(JTATransactionFactory.java:98)
--
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-2279) Cannot fully disable integration with Hibernate Validator
by Jacek Chleborowicz (JIRA)
Cannot fully disable integration with Hibernate Validator
---------------------------------------------------------
Key: HHH-2279
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2279
Project: Hibernate3
Type: Improvement
Components: metamodel
Versions: 3.2.0.cr2
Reporter: Jacek Chleborowicz
Priority: Minor
I use Hibernate Validator for application-level validation.
I disabled pre-insert and pre-update event listeners from Hibernate Validator.
I allow persisting data, which doesn't match validation rules defined by Hibernate Validator annotations.
Unfortunately Hibernate Validator is used in metamodel construction and i cannot disable it.
For example, if i use @NotNull annotation, i've got: PropertyValueException with message "not-null property references a null or transient value: ...", because @NotNull annotation is recognized in metamodel construction.
There should be configuration property defining if Hibernate integrates with Hibernate Validator. It should enable/disable:
- usage of Hibernate Validator in metamodel construction;
- registration of Validator event listeners.
--
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