[Hibernate-JIRA] Commented: (HHH-1829) Allow join on any property using property-ref
by Anthony Patricio (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829?page=c... ]
Anthony Patricio commented on HHH-1829:
---------------------------------------
Robert, Mathieu...
could you upload the svn diff please?
> Allow join on any property using property-ref
> ---------------------------------------------
>
> Key: HHH-1829
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829
> Project: Hibernate Core
> Issue Type: New Feature
> Components: metamodel
> Affects Versions: 3.2.0 cr1, 3.2.0.cr2
> Reporter: Maarten Winkels
> Assignee: Anthony Patricio
> Attachments: AbstractJoinTest.java, HHH-1829-mwinkels.patch, hhh-1829.patch, JoinNoPropertyRefTest.java, JoinPropertyRefTest.java, Person.hbm.xml, Person.java, PersonNoPropertyRef.hbm.xml
>
>
> Currently joining tables for one class (uing the <join...> tag) is only supported for the id property. The property-ref is allowed on the <key..> tag inside the <join..> tag, but this is ignored.
--
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
15 years, 2 months
[Hibernate-JIRA] Commented: (HHH-1595) SQL syntax error on delete statement with subselect
by strong liu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1595?page=c... ]
strong liu commented on HHH-1595:
---------------------------------
Georgios, do you have a valid test case? if so, please attach it
> SQL syntax error on delete statement with subselect
> ---------------------------------------------------
>
> Key: HHH-1595
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1595
> Project: Hibernate Core
> Issue Type: Bug
> Components: query-hql
> Affects Versions: 3.1.3
> Environment: Hibernate 3.1.3, Oracle 10g
> Reporter: Georgios Skempes
> Assignee: strong liu
>
> After upgrading from Hibernate 3.1.2 to 3.1.3 I get an SQL syntax error for the HQL statement below. It's a bulk delete containing a subselect. The code is working for Hibernate 3.1.2
> Code between session.open() and session.close():
> ------------------------------------------------------------------------
> String queryString = "delete from Contact con where con.Id.ConpId IN (select conp.Id from con.ContactpersonSet conp where conp.ParId=4711)
> Query queryObject = session.createQuery(queryString);
> queryObject.executeUpdate();
> SQL code generated with Hibernate 3.1.2 (correct):
> ----------------------------------------------------------------------
> delete from CONTACTS where CONP_ID in (select contactper1_.Id from CONTACTPERSONS contactper1_ where CONP_ID=contactper1_.Id and PAR_ID=4711)
> SQL code generated with Hibernate 3.1.3 (error):
> -----------------------------------------------------------------------
> delete from CONTACTS where CONP_ID in (select contactper1_.Id from CONTAKTPERSONS contactper1_ where contact0_.CONP_ID=contactper1_.Id and contactper1_.PAR_ID=?)
> Error log:
> -----------------------------------------------------------------------
> [08:43:01,591] (ERROR) org.hibernate.util.JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.java:72) - ORA-00904: "CONTACT0_"."CONP_ID": 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
15 years, 2 months
[Hibernate-JIRA] Created: (HHH-4482) certain forms of HQL generate errors if your package names contain a sql reserved word
by Karl Palsson (JIRA)
certain forms of HQL generate errors if your package names contain a sql reserved word
--------------------------------------------------------------------------------------
Key: HHH-4482
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4482
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.3.2, 3.2.6
Environment: oracle and hsqldb, tested both 3.3.2GA and 3.2.6GA
Reporter: Karl Palsson
The following queries generates the invalid sql below, if your java package name starts with a sql reserved word, but work just fine if they don't.
session.createQuery("delete Usergroup where userName = :userName")...
session.createQuery("delete Usergroup u where u.userName = :userName")
The following sql is generated "delete is.vf.nip.provision.handlers.radius.entities.Usergroup where userName = :userName" which fails with the message: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: is near line 1, column 8
If you change the query to "delete from Usergroup where userName = :userName" you get more normal looking sql like, "delete from usergroup where UserName=?"
All of these forms worked when my packages didn't start with "is" I've tried to use the ClassicQueryTranslator, but my settings don't seem to take hold for that.
I can work around this by changing the queries, but my package names should have no bearing on generated sql :(
This is probably the same as: HHH-3213
--
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
15 years, 3 months