[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1046) Make Criteria & DetachedCriteria cloneable

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Fri Nov 17 08:43:04 EST 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1046?page=comments#action_25357 ] 

Max Rydahl Andersen commented on HHH-1046:
------------------------------------------

patches are much better in ensuring progress....

> 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.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list