From: <leg...@at...> - 2004-03-08 07:00:57
|
The following comment has been added to this issue: Author: Emmanuel Bernard Created: Mon, 8 Mar 2004 12:43 AM Body: Henri's right. I attached a pach that was not revelant with the bug description. I *finally* applied part of my patch on the 2.2 branch: when columns of components are not-null then it throws a PropertyValueException(). Tell me if you want I add this 'not-null for component' feature. About this instanciate-when-null feature, I'm not sure this is consistent, but I haven't found any sample. I used to need that on a project that migrates from Toplink to Hibernate (Toplink had this feature AFAIK) to prevent NPE on the presentation layer. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-31 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-31 Summary: Component not null Type: Improvement Status: Unassigned Priority: Minor Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate2 Components: core Assignee: Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:18 AM Updated: Mon, 8 Mar 2004 12:43 AM Description: Component not null When all properties of component have null value Hibernate not instantiate that class. It will be nice to be able define will or will not component be instantiated in case all properties are null. For example if there are no values of columns "address_city" and "address_street" but address must not be null the instance of Address class must be assigned to property Enterprise.address. <class name="Enterprise"> <property name="name"/> <component name="address" class="Address" <b>not-null="true"</b>> <property name="city" column="address_city"/> <property name="street" column="address_street"/> </component> </class> With best regards. Dmitry M.ivlev http://sourceforge.net/tracker/index.php?func=detail&aid=706054&group_id=40712&atid=428711 --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |