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

Diego Pires Plentz (JIRA) noreply at atlassian.com
Tue Aug 14 11:04:13 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diego Pires Plentz reassigned HHH-2369:
---------------------------------------

    Assignee: Diego Pires Plentz

> 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
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 3.2.1
>            Reporter: James Roper
>            Assignee: Diego Pires Plentz
>            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