[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2952?page=c...
]
Kai Prünte updated HHH-2952:
----------------------------
Attachment: SQLAliasedCriterion.java
I also run into this problem and try your classes.
As mentioned before sometimes it is not easy to patch Hibernate or other third party libs.
I will get into trouble with my deployment. Because of that reason I changed
SQLAliasedCriterion in that way, that no modifications of existing Hibernate code is
necessary. If you want to use it, please have a look into the exception handling. This is
only quick and dirty.
Support for referencing non-root entities in Criteria SQL
expressions
---------------------------------------------------------------------
Key: HHH-2952
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2952
Project: Hibernate Core
Issue Type: Improvement
Components: query-criteria
Affects Versions: 3.2.2
Environment: Java 5, MySQL 5.0, Eclipse 3.2
Reporter: Jacob Gyllenstierna
Assignee: Diego Plentz
Attachments: RestrictionsExt.java, SQLAliasedCriterion.java,
SQLAliasedCriterion.java, SQLAliasedProjection.java
It would be very helpful to be able to reference non-root entities in Criteria SQL
restrictions and projections using placeholders similar to {alias}. A very simple but
uninteresting example:
criteria.createAlias("group", "g");
criteria.add(Restrictions.sqlRestriction("{g}.id=:groupId"));
--
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