[Hibernate-JIRA] Created: (HHH-2013) While Using DetachedCriteria as subselect if the detached criteria has a subCriteria exception is being thrown
by Dilip Ranjith (JIRA)
While Using DetachedCriteria as subselect if the detached criteria has a subCriteria exception is being thrown
--------------------------------------------------------------------------------------------------------------
Key: HHH-2013
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2013
Project: Hibernate3
Type: Bug
Versions: 3.0.5
Environment: HIbernate 3.0.5 Oracle
Reporter: Dilip Ranjith
While Using DetachedCriteria as subselect if the detached criteria has a subCriteria exception is being thrown
DetachedCriteria detachedCriteria = DetachedCriteria.forClass(Shop.class);
detachedCriteria .createCriteria("productDTO").add(Restrictions.eq("ID", productCode.toString()));
shopSet = new LinkedHashSet(detachedCriteria .getExecutableCriteria(session).list()); ---> Works correctly
detachedCriteria .setProjection(Projections.property("ID"));----------> projection in DetachedCriteria
Criteria criteria = session.createCriteria(StatusDTO.class);
criteria .add(Property.forName("transactionID").in(detachedCriteria ));
criteria .list() --------------> (Gives exception)
Throws an SQLGrammerException
java.sql.SQLException: ORA-00904: "PRODUCTMAS1_"."PRODUCTID": invalid identifier
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-514) getDatabaseMajorVersion unsupported by some Oracle drivers
by Michael Wang (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-514?page=co... ]
Michael Wang commented on HHH-514:
----------------------------------
Hibernate 3.1 & Oracle 9i2 & jdk 1.5 & Tomcat 5.5
1. download the hibernate and unzip it. then edit the hibernate.properties file (in hibernate-3.1\etc) of database part as
## Oracle
hibernate.dialect org.hibernate.dialect.OracleDialect
hibernate.dialect org.hibernate.dialect.Oracle9Dialect
hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
hibernate.connection.username caveatemptor
hibernate.connection.password caveatemptor
hibernate.connection.url jdbc:oracle:thin:@localhost:1521:itprod
and commet out default configure for HypersonicSQL.
2. copy the oracle driver classes12.jar into the lib directory.
3. run command build to make hibernate3.jar.
4. remove/comment out the db configure in hibernate.cfg.xml file of application.
(eg. the caveatemptor sample, which is in C:\caveatemptor-book\src\etc\webapp.test\conf)
5. deploy the application to tomcat.
6. the oracle 9i with hibernate 3.1 is up rinning right now!
> getDatabaseMajorVersion unsupported by some Oracle drivers
> ----------------------------------------------------------
>
> Key: HHH-514
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-514
> Project: Hibernate3
> Type: Bug
> Components: core
> Versions: 3.0.4
> Environment: WLS 8.1 SP2, Hibernate 3.0.4, Oracle9i Enterprise Edition Release 9.2.0.4.0, Oracle JDBC driver 9.2.0.3.0
> Reporter: Mathias Bogaert
> Priority: Critical
>
>
> Put an extra try catch around databaseMajorVersion = meta.getDatabaseMajorVersion(); in SettingsFactory (change occured in version 1.31) and handle 0 value in DialectFactory.buildDialect.
> WARN - Could not obtain connection metadata
> java.sql.SQLException: Kenmerk wordt niet ondersteund.
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
> at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:690)
> at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4451)
> at weblogic.jdbc.wrapper.DatabaseMetaData_oracle_jdbc_driver_OracleDatabaseMetaData.getDatabaseMajorVersion(Unknown Source
> )
> at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:75)
> at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1901) Filtering on superclass property problem
by Juan Ignacio Cidre (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1901?page=c... ]
Juan Ignacio Cidre commented on HHH-1901:
-----------------------------------------
Will provide a minimum mapping and test case shortly. Thank you!
> Filtering on superclass property problem
> ----------------------------------------
>
> Key: HHH-1901
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1901
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.3
> Environment: Hibernate 3.1.3 on Oracle 9i
> Reporter: Juan Ignacio Cidre
>
>
> I have three classes Order, Advertisements and Creatives.
> Advertisements is subclass of Creatives
> Order has a one-to-many to Advertisements
> That one-to-many has a filter. The condition has to do with a property of Creative, the Advertisements superclass.
> This is the Order to Advertisements mapping with a filter on deletionStatusId that is a field of Creative.
> <set name="ads" inverse="true" lazy="true">
> <key column="orderId"/>
> <one-to-many class="com.inceptor.domain.msn.Advertisement"/>
> <filter name="deletionStatusFilter" condition="deletionStatusId = 0"/>
> </set>
> This is the Creative mapping with the deletionStatusId, which is mapped as a component. It is a Enum in Java.
> <component name="deletionStatus"
> class="com.inceptor.domain.core.DeletionStatusType">
> <property name="number" column="deletionStatusId" />
> </component>
> I would expected an sql that appends a where condition like [superclass (Creative) table alias].deletionStatusId instead I received [subclass (Advertisements) table alias].deletionStatusId
> This generates a DB error.
> Follows the generated query
> Note ads0_ instead of ads0_1_
> select ads0_.orderId as orderId1_, ads0_.id as id1_, ads0_.id as ID324_0_, ads0_1_.version as version324_0_, ads0_1_.searchEngineAccountId as searchEn3_324_0_, ads0_1_.creationTime as creation4_324_0_, ads0_1_.creatorId as creatorId324_0_, ads0_1_.modificationTime as modifica6_324_0_, ads0_1_.synchTime as synchTime324_0_, ads0_1_.modifierId as modifierId324_0_, ads0_1_.deletionStatusId as deletion9_324_0_, ads0_1_.deleterId as deleterId324_0_, ads0_1_.pushError as pushError324_0_, ads0_.seId as seId418_0_, ads0_.title as title418_0_, ads0_.description as descript4_418_0_, ads0_.displayURL as displayURL418_0_, ads0_.destinationURL as destinat6_418_0_, ads0_.originalDestinationURL as original7_418_0_, ads0_.orderId as orderId418_0_ from MSN_Advertisements ads0_ inner join GTK_Creatives ads0_1_ on ads0_.id=ads0_1_.ID where ads0_.deletionStatusId = 0 and ads0_.orderId=?
--
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
18 years, 4 months
[Hibernate-JIRA] Created: (HBX-732) SchemaExport fails when using annotated classes
by Jared Warren (JIRA)
SchemaExport fails when using annotated classes
-----------------------------------------------
Key: HBX-732
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-732
Project: Hibernate Tools
Type: Bug
Components: reverse-engineer
Versions: 3.1beta3
Environment: Hibernate 3.1.3, Hibernate Annotations 3.2.0, hsqldb
Reporter: Jared Warren
When you try to run SchemaExport from the command line with a single file defined in a <mapping class"..."> element, it fails with the following exception:
org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="com.drinkupstream.heroes.Hero"/>
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1478)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:359)
Changing line 313 (the first real line in the main) from:
Configuration cfg = new Configuration();
to:
Configuration cfg = new AnnotationConfiguration();
fixes the problem. But I don't know if that introduces other bugs......it's just a hack on my end. Another possibility would be to wait until after the args are parsed to instantiate a Configuration and provide an arg that will dictate with Configuration to instantiate.
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1901) Filtering on superclass property problem
by Yajun Shi (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1901?page=c... ]
Yajun Shi commented on HHH-1901:
--------------------------------
Sorry, Max. The above comment came from myself, a new member of dev team in SourceLabs, Inc. I have created a personal account for use.
> Filtering on superclass property problem
> ----------------------------------------
>
> Key: HHH-1901
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1901
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.3
> Environment: Hibernate 3.1.3 on Oracle 9i
> Reporter: Juan Ignacio Cidre
>
>
> I have three classes Order, Advertisements and Creatives.
> Advertisements is subclass of Creatives
> Order has a one-to-many to Advertisements
> That one-to-many has a filter. The condition has to do with a property of Creative, the Advertisements superclass.
> This is the Order to Advertisements mapping with a filter on deletionStatusId that is a field of Creative.
> <set name="ads" inverse="true" lazy="true">
> <key column="orderId"/>
> <one-to-many class="com.inceptor.domain.msn.Advertisement"/>
> <filter name="deletionStatusFilter" condition="deletionStatusId = 0"/>
> </set>
> This is the Creative mapping with the deletionStatusId, which is mapped as a component. It is a Enum in Java.
> <component name="deletionStatus"
> class="com.inceptor.domain.core.DeletionStatusType">
> <property name="number" column="deletionStatusId" />
> </component>
> I would expected an sql that appends a where condition like [superclass (Creative) table alias].deletionStatusId instead I received [subclass (Advertisements) table alias].deletionStatusId
> This generates a DB error.
> Follows the generated query
> Note ads0_ instead of ads0_1_
> select ads0_.orderId as orderId1_, ads0_.id as id1_, ads0_.id as ID324_0_, ads0_1_.version as version324_0_, ads0_1_.searchEngineAccountId as searchEn3_324_0_, ads0_1_.creationTime as creation4_324_0_, ads0_1_.creatorId as creatorId324_0_, ads0_1_.modificationTime as modifica6_324_0_, ads0_1_.synchTime as synchTime324_0_, ads0_1_.modifierId as modifierId324_0_, ads0_1_.deletionStatusId as deletion9_324_0_, ads0_1_.deleterId as deleterId324_0_, ads0_1_.pushError as pushError324_0_, ads0_.seId as seId418_0_, ads0_.title as title418_0_, ads0_.description as descript4_418_0_, ads0_.displayURL as displayURL418_0_, ads0_.destinationURL as destinat6_418_0_, ads0_.originalDestinationURL as original7_418_0_, ads0_.orderId as orderId418_0_ from MSN_Advertisements ads0_ inner join GTK_Creatives ads0_1_ on ads0_.id=ads0_1_.ID where ads0_.deletionStatusId = 0 and ads0_.orderId=?
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1901) Filtering on superclass property problem
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1901?page=c... ]
Max Rydahl Andersen commented on HHH-1901:
------------------------------------------
sourcelabs...couldn't you guys login with a personal name instead of a group name ?
> Filtering on superclass property problem
> ----------------------------------------
>
> Key: HHH-1901
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1901
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.3
> Environment: Hibernate 3.1.3 on Oracle 9i
> Reporter: Juan Ignacio Cidre
>
>
> I have three classes Order, Advertisements and Creatives.
> Advertisements is subclass of Creatives
> Order has a one-to-many to Advertisements
> That one-to-many has a filter. The condition has to do with a property of Creative, the Advertisements superclass.
> This is the Order to Advertisements mapping with a filter on deletionStatusId that is a field of Creative.
> <set name="ads" inverse="true" lazy="true">
> <key column="orderId"/>
> <one-to-many class="com.inceptor.domain.msn.Advertisement"/>
> <filter name="deletionStatusFilter" condition="deletionStatusId = 0"/>
> </set>
> This is the Creative mapping with the deletionStatusId, which is mapped as a component. It is a Enum in Java.
> <component name="deletionStatus"
> class="com.inceptor.domain.core.DeletionStatusType">
> <property name="number" column="deletionStatusId" />
> </component>
> I would expected an sql that appends a where condition like [superclass (Creative) table alias].deletionStatusId instead I received [subclass (Advertisements) table alias].deletionStatusId
> This generates a DB error.
> Follows the generated query
> Note ads0_ instead of ads0_1_
> select ads0_.orderId as orderId1_, ads0_.id as id1_, ads0_.id as ID324_0_, ads0_1_.version as version324_0_, ads0_1_.searchEngineAccountId as searchEn3_324_0_, ads0_1_.creationTime as creation4_324_0_, ads0_1_.creatorId as creatorId324_0_, ads0_1_.modificationTime as modifica6_324_0_, ads0_1_.synchTime as synchTime324_0_, ads0_1_.modifierId as modifierId324_0_, ads0_1_.deletionStatusId as deletion9_324_0_, ads0_1_.deleterId as deleterId324_0_, ads0_1_.pushError as pushError324_0_, ads0_.seId as seId418_0_, ads0_.title as title418_0_, ads0_.description as descript4_418_0_, ads0_.displayURL as displayURL418_0_, ads0_.destinationURL as destinat6_418_0_, ads0_.originalDestinationURL as original7_418_0_, ads0_.orderId as orderId418_0_ from MSN_Advertisements ads0_ inner join GTK_Creatives ads0_1_ on ads0_.id=ads0_1_.ID where ads0_.deletionStatusId = 0 and ads0_.orderId=?
--
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
18 years, 4 months