From: <leg...@at...> - 2003-09-03 14:06:28
|
The following comment has been added to this issue: Author: tekno Created: Wed, 3 Sep 2003 9:06 AM Body: It would be nice to be able to specify default values for properties, components etc. Especially primitive type nullable columns which irritatingly throw null pointer exceptions if the column value is not set. --------------------------------------------------------------------- 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 Project: Hibernate2 Assignee: Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:18 AM Updated: Tue, 13 May 2003 6:27 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 |
From: <leg...@at...> - 2003-12-06 15:23:41
|
The following comment has been added to this issue: Author: Emmanuel Bernard Created: Sat, 6 Dec 2003 9:23 AM Body: By the way, this patch correct a minor bug in the 2.1 rc1. PropertyValueException were displaying the class name of the persister instead of the class name of the mapped class. --------------------------------------------------------------------- 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 Project: Hibernate2 Assignee: Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:18 AM Updated: Sat, 6 Dec 2003 9:23 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 |
From: <leg...@at...> - 2004-03-07 11:48:28
|
The following comment has been added to this issue: Author: Gavin King Created: Sun, 7 Mar 2004 5:31 AM Body: Emmanuel, what is the status of this? --------------------------------------------------------------------- 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: Sun, 7 Mar 2004 5:31 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 |
From: <leg...@at...> - 2004-03-07 14:54:35
|
The following comment has been added to this issue: Author: Henri Tremblay Created: Sun, 7 Mar 2004 8:38 AM Body: From what I've followed, Emmanuel's patch currently allow to have an exception when a component is flagged as not-null="true". Unfortunatly the defect is more about being able to choose between instantiating a component with all null values or no component at all. This is really useful for example if you denormalize a one-to-one relation to put everything in one table. However, I'm not sure we should use the not-null tag to implement that. It has already another meaning (the one Emmanuel is giving to it and that is consistent with the rest of the application). I will suggest something like always-create="true|false" (default false to prevent breaking existing code). If we all agree on how to fix this. I can provide a patch if nobody else is volunteer. I'll be happy to do it since I need that fix :-) --------------------------------------------------------------------- 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: Sun, 7 Mar 2004 8:38 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 |
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 |