[Hibernate-JIRA] Closed: (HBX-689) The query task
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-689?page=all ]
Max Rydahl Andersen closed HBX-689:
-----------------------------------
Fix Version: 3.2beta7
(was: 3.2LATER)
Resolution: Fixed
> The query task
> ---------------
>
> Key: HBX-689
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-689
> Project: Hibernate Tools
> Type: Bug
> Components: ant
> Versions: 3.1.beta5
> Environment: Hibernate 3.1.3, against HSQL DB.
> Reporter: Dave Minter
> Priority: Minor
> Fix For: 3.2beta7
> Attachments: trace.txt
>
>
> Running the following query task against my database:
> <htools destdir="${sql}">
> <classpath refid="classpath.apps"/>
> <annotationconfiguration configurationfile="${src}/hibernate.cfg.xml"/>
> <query destfile="sql.log">from Note</query>
> </htools>
> Fails with the attached lavish stack trace. The cause of the problem appears to be a single character typo in:
> org.hibernate.tool.hbm2x.QueryExporter on line 47 where a variable "iter" is used instead of "iter1".
> There also appears to be a bug preventing the nested <hql> tasks from working, but I'm uncertain if that's an artifact of this problem or a separate 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
18 years, 5 months
[Hibernate-JIRA] Commented: (HHH-158) nested DetachedCriteria throwing NullPointerException
by Dan Adams (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-158?page=co... ]
Dan Adams commented on HHH-158:
-------------------------------
I definitely would like to see a fix for this.
> nested DetachedCriteria throwing NullPointerException
> -----------------------------------------------------
>
> Key: HHH-158
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-158
> Project: Hibernate3
> Type: Bug
> Components: core
> Versions: 3.0 beta 4
> Reporter: Jérôme Boehm
> Assignee: Gavin King
> Attachments: testcase.zip
>
>
> It seems that it is not possible to nest DetachedCriteria.
> This is examplified in the testWithReturnedObject() method of the attached TestCase.
> When nesting DetachedCriteria using DetachedCriteria.add(Subqueries.<a_Subqueries_static_method>) twice, we get the following exception:
> java.lang.NullPointerException
> at org.hibernate.criterion.SubqueryExpression.getTypedValues(SubqueryExpression.java:73)
> at org.hibernate.loader.criteria.CriteriaQueryTranslator.getQueryParameters(CriteriaQueryTranslator.java:230)
> at org.hibernate.criterion.SubqueryExpression.toSqlString(SubqueryExpression.java:50)
> at org.hibernate.criterion.Junction.toSqlString(Junction.java:58)
> at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:312)
> at org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:92)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1208)
> at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)
> at test.subqueries.SubqueriesTest.main(SubqueriesTest.java:41)
> Then, after "correcting" SubqueryExpression so that the params instance variable is initialized (see the attached Corrected_SubqueryExpression), it seems that the nested aliases are not properly propagated, which is examplified in testWithNoReturnedObject().
> The generated sql is:
> select this_.a_id as a1_0_ from a this_ where exists (select this0__.b_id as y0_ from b this0__ where this0__.a_id=this_.a_id and exists (select this0__.c_id as y0_ from c this0__ where this0__.b_id=this0__.b_id))
> I think it should be (notice the this1__ alias for table c):
> select this_.a_id as a1_0_ from a this_ where exists (select this0__.b_id as y0_ from b this0__ where this0__.a_id=this_.a_id and exists (select this1__.c_id as y0_ from c this1__ where this1__.b_id=this0__.b_id))
--
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, 5 months
[Hibernate-JIRA] Created: (HHH-2002) Setting the Primary Key when using Oracle
by Garnet Miller (JIRA)
Setting the Primary Key when using Oracle
-----------------------------------------
Key: HHH-2002
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2002
Project: Hibernate3
Type: Bug
Environment: Hibernate 3.0 on Oracle 10G
Reporter: Garnet Miller
Priority: Blocker
The database is Oracle 10G, the primary keys are generated by firing a trigger which gets the next value from a sequence number generator and inserting this value into the primary key column. The problem is that when we insert a record to a parent and an associated record into the child table at the same time I'm not able to have hibernate insert into the parent table and then use this value in the foriegn key of the child table.
A work around is to get the next value from the sequence generator manually using hibernate and then use this in the child tables foriegn key. However this requires the trigger to be changed to accept a value for the primary key if one is given and if one is not given to fire the trigger and populate the primary key. There are other applications using the database and this is not the preferred approach.
Any ideas on how to solve this?
--
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, 5 months