From: Anjo K. <kr...@lo...> - 2005-09-02 20:34:48
|
The whole idea was that the rules in D2W set the "propertyIsMandatory" (or whatever the name is) to the relationship's isMandatory. So in order to have [ER]D2WEditToOneRelationship behave correctly, support the correct "- choose one -" and not throw SQL errors, you need the relationships and/or their foreign keys set up correctly. If you feel annoyed by this then by all means read the code in ERXEntityClassDescription, there should be some flag to turn this off (which would be stupid, you'd be better off to fix the model). Am 02.09.2005 um 17:49 schrieb Kieran Kelleher: > Sako, > > If the relationship is mandatory, then make the FK to _NOT_ allows > NULL > > If the relationship is optional, then make the FK to _ALLOW_ NULL. > > These two aspects must agree to stop the warnings. These aspects must agree in order to *make sense*! > Regards, Kieran > > > On Sep 2, 2005, at 7:47 AM, web...@da... wrote: > > >> Hi Kieran, >> >> Mandatory doesnt solve the problem >> i get this error now >> >> WARN 13:42:43 (er.extensions.ERXEntityClassDescription:376) -Order: >> relationship 'User' is marked to-one and mandatory, but the >> foreign key >> 'userId' allows NULL values >> >> I have to worry about the wornings (I think), I just cant fetch >> objects from >> DB as soon as i use WONDER. i just have problems with code works >> without >> WONDER. >> >> Sako. >> >> ----- Original Message ----- >> From: "Kieran Kelleher" <kie...@ma...> >> To: <web...@da...> >> Cc: <won...@li...> >> Sent: Friday, September 02, 2005 2:39 AM >> Subject: Re: [Wonder-disc] relationship warning >> >> >> >>> Well you could also fix it by making the relationship mandatory >>> in the >>> relationship inspector. Then a no-nulls allowed FL will make sense >>> ..... but it's just a warning for your information ..... I would not >>> worry about it ..... and it only happens at application startup when >>> Project Wonder loads your class descriptions. >>> >>> Regards, Kieran >>> >>> On Sep 1, 2005, at 3:02 PM, web...@da... wrote: >>> >>> >>>> Thank you for answering Kieran. >>>> >>>> >>>> ----- Original Message ----- >>>> From: "Kieran Kelleher" <kie...@ma...> >>>> To: <web...@da...> >>>> Cc: <won...@li...> >>>> Sent: Thursday, September 01, 2005 8:05 PM >>>> Subject: Re: [Wonder-disc] relationship warning >>>> >>>> >>>> >>>>> It is warning you about something that does not make sense in your >>>>> EOModel. >>>>> >>>> I am not sure if this is correct! >>>> For me makes sense and with good reasons also. >>>> I have User and table call Order >>>> User has the PK and the Order has the FK. >>>> they are like (User PK -one-to-Many FK Order) >>>> It makes no sence to have a row in table Order without FK from >>>> User. >>>> switching this to accepts null, makes for me very important >>>> feature of >>>> the >>>> DB to disappeare. >>>> >>>> However, this is another Thame. >>>> >>>> >>>> >>>>> >>>>> Just click the check mark to Allow Null on userId in your EOModel. >>>>> >>>> Does this mean Wonder can not accept FK to be not null? >>>> Do i have another effects more thank Wonder warnings to that? >>>> >>>> >>>> Sako >>>> >>>> >>>>> >>>>> PS. Do not name a database table by the name 'USER', 'User' or >>>>> 'user' >>>>> since it is a reserved word in some vendors' databases (such as >>>>> MySQL) >>>>> >>>> I do not. >>>> I send unwillingly my real struture via the net. >>>> Its just pseudo names. Anyway Thanks for the hint. >>>> >>>> >>>> >>>> >>>> >>>> >>>>> >>>>> On Sep 1, 2005, at 9:29 AM, web...@da... wrote: >>>>> >>>>> >>>>>> Hello, >>>>>> >>>>>> Wonder gives the following Warining >>>>>> >>>>>> situstion : User -one-to-many- Order >>>>>> WARN 15:20:02 (er.extensions.ERXEntityClassDescription:359) - >>>>>> Order: >>>>>> relationship 'User' is marked to-one and optional, but the >>>>>> foreign >>>>>> key >>>>>> 'userId' does NOT allow NULL values >>>>>> >>>>>> How to get rid of this? >>>>>> >>>>>> >>>>>> Sako. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------- >>>>>> SF.Net email is Sponsored by the Better Software Conference & >>>>>> EXPO >>>>>> September 19-22, 2005 * San Francisco, CA * Development Lifecycle >>>>>> Practices >>>>>> Agile & Plan-Driven Development * Managing Projects & Teams * >>>>>> Testing >>>>>> & QA >>>>>> Security * Process Improvement & Measurement * >>>>>> http://www.sqe.com/bsce5sf >>>>>> _______________________________________________ >>>>>> Wonder-disc mailing list >>>>>> Won...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> SF.Net email is Sponsored by the Better Software Conference & EXPO >>>>> September 19-22, 2005 * San Francisco, CA * Development Lifecycle >>>>> >>>> Practices >>>> >>>>> Agile & Plan-Driven Development * Managing Projects & Teams * >>>>> Testing >>>>> & QA >>>>> Security * Process Improvement & Measurement * >>>>> http://www.sqe.com/bsce5sf >>>>> _______________________________________________ >>>>> Wonder-disc mailing list >>>>> Won...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> SF.Net email is Sponsored by the Better Software Conference & EXPO >>>> September 19-22, 2005 * San Francisco, CA * Development Lifecycle >>>> Practices >>>> Agile & Plan-Driven Development * Managing Projects & Teams * >>>> Testing >>>> & QA >>>> Security * Process Improvement & Measurement * >>>> http://www.sqe.com/bsce5sf >>>> _______________________________________________ >>>> Wonder-disc mailing list >>>> Won...@li... >>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >>>> >>>> >>> >>> >>> >>> >> >> > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * > Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/ > bsce5sf > _______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc > |