[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2369) Documentation doesn't state what hibernate returns for empty/null collections

James Roper (JIRA) noreply at atlassian.com
Wed Jan 17 22:46:44 EST 2007


Documentation doesn't state what hibernate returns for empty/null collections
-----------------------------------------------------------------------------

         Key: HHH-2369
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2369
     Project: Hibernate3
        Type: Improvement

  Components: documentation  
    Versions: 3.2.1    
    Reporter: James Roper
    Priority: Trivial


Reading the hibernate documentation, section 6.1:
"Hibernate does not distinguish between a null collection reference and an empty collection"

This is all very well, but what does hibernate return when loading a null/empty collection?

According to the EJB3 specification, section 2.1.7:
"If there are no associated entities for a multi-valued relationship of an entity fetched from the database, the persistence provider is responsible for returning an empty collection as the value of the relationship."

If this is the behavior that hibernate implements, then this should be explicitly stated in the hibernate documentation, so that developers know whether they need to do null checks or not after loading an object from the database.

-- 
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