Hello david... UUFFFF my life gets better htne because Im using Mysql. On Tue, Aug 11, 2009 at 1:16 PM, David Avendasora <[email protected] > wrote:
> > On Aug 11, 2009, at 7:05 AM, Gustavo Pizano wrote: > > Hello Dave. > > It does have only one parent. > > > Well that's good. It makes your life much easier. > > What database are you using for this project? Keep in mind that WO doesn't > insert objects into the database in the same order in which you may have > created them, so it is entirely possible for WO to try to insert a "Sub > Area" before it's "Parent Area" is inserted. Most DBs handle this situation > by allowing you to defer constraints, which is handled automatically for you > by the WO DB plugin. Microsoft SQLServer however does not have deferred > constraints and the DB plugin doesn't handle this specific situation, so if > you are using SQLServer, be careful with self-referential relationships. > > Dave > > > > On Tue, Aug 11, 2009 at 1:02 PM, David Avendasora < > [email protected]> wrote: > >> >> On Aug 11, 2009, at 6:21 AM, Gustavo Pizano wrote: >> >> Hello Im doing an eomodel.. .and I have an entity called Area, and >>> SubArea, for me an area can have many subareas, but subarea its an area >>> itself also.. >>> so its like Area <- >>SubArea. >>> >> >> If a SubArea is really just an Area with a parent, then I'd just have one >> Entity of Area with an optional to-one relationship to parent. >> >> I'd model it as Area <->> Area with Area having a foreign key that >> points to the PK. You'll end up with each Area having a parentArea and >> multiple subAreas. >> >> This assumes that an Area can have only one parent. If an Area can have >> more than one parent, then you'll need a many-to-many join. >> >> Dave >> >> >> >>> Now what are the implications of defyning Area with its properties, and >>> then SubArea and put as parent Area?... I see that inside Area Entity there >>> is SubArea Entity also... but I guess this doesn't guaranties me the to-many >>> relationship between the 2 entities isn't it?do I still have t defying the >>> relationship? >>> >>> >>> Thanks >>> >>> Gustavo >>> >>> _______________________________________________ >>> Do not post admin requests to the list. They will be ignored. >>> Webobjects-dev mailing list ([email protected]) >>> Help/Unsubscribe/Update your Subscription: >>> >>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com >>> >>> This email sent to [email protected] >>> >> >> > >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
