[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1046?page=c...
]
Vjeran Marcinko commented on HHH-1046:
--------------------------------------
Can the priority of this be raised since number of posts on user list suggest that people
have problem because of this little inconvenience? One of most common uses of Criteria
copying/cloning is for pagination, and this makes it unnecessary hard.
BTW, related Jira issue with this is HHH-635:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-635
Make Criteria & DetachedCriteria cloneable
------------------------------------------
Key: HHH-1046
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1046
Project: Hibernate3
Type: Improvement
Components: core
Versions: 3.0.5
Environment: Hibernate 3.0.5, Database irrelevant
Reporter: Corey Puffalt
Priority: Minor
Criteria and in particular, DetachedCriteria would be substantially more useful if they
were made cloneable either by implementing clone() or via some other method if Cloneable
is abhorrent.
This has already come up a number of times on the forums where people want to do things
like write general methods that can take a Criteria and perform a count on it. However,
doing so has sideaffects (you've changed the Projection on the Criteria.) Some of
these sideaffects are reversable but requires extra care and attention. Furthermore, not
all operations are reversable. For instance, addOrder() etc.
In my opinion, it would greatly enhance the utility of these classes by providing this
feature.
--
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