From: Chad B. <chd...@ya...> - 2004-09-30 17:13:04
|
Thanks Bruno, I'll apply the patch. Chad ----- Original Message -----=20 From: Bruno Su=E1rez Laffargue=20 To: Andromda User=20 Sent: Thursday, September 30, 2004 9:48 AM Subject: Re: [Andromda-user] Hibernate hierarchy problem As my problem was only with hierarchy childs (and only in the database = layer), I've changed one line in HibernateEntity.vsl (into hibernate = cartridge) line 75 changed from: #if($attribute.required) * not-null=3D"true" #end to #if($attribute.required && !$entity.generalization) * not-null=3D"true" #end It runs fine for me. :-)=20 Regards Bruno Bruno Su=E1rez Laffargue dijo lo siguiente el 28/09/2004 20:20:=20 Hi all, I'm getting an unexpected non-null error from the database. I have M3 version, from a week or two ago. I have a hierarchy of clases C, C1 and C2. C1 and C2 are sons of C, = they're at the same level. I have an attribute att1 in C1 and another one att2 in C2. When I try to make a save of C1 I get: Missing non-NULL value: att2. In fact, in my C1 object I have no attribute att2 to set... I know that is because of the one table per hierarchy solution. I've thinked two ways of solving it: - setting the attributes of every child of the hierarchy as = nullables. (this makes the scenario unreal, because the attributes are = not nullable for the subclasses) - setting the attribute a default value in the model. (I haven't = see any change, neither in the java class, neither in the create table = sentence) Is there any other way to solve it? Thanks Bruno ------------------------------------------------------- This SF.net = email is sponsored by: IT Product Guide on ITManagersJournal Use IT = products in your business? Tell us what you think of them. Give us Your = Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more = http://productguide.itmanagersjournal.com/guidepromo.tmpl = _______________________________________________ Andromda-user mailing = list And...@li... = https://lists.sourceforge.net/lists/listinfo/andromda-user=20 ------------------------------------------------------- This SF.net = email is sponsored by: IT Product Guide on ITManagersJournal Use IT = products in your business? Tell us what you think of them. Give us Your = Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more = http://productguide.itmanagersjournal.com/guidepromo.tmpl = _______________________________________________ Andromda-user mailing = list And...@li... = https://lists.sourceforge.net/lists/listinfo/andromda-user |