Thanx a lot.

This is not very intuitive, but it works. The problems is that I'm thinking
object oriented, but this relational.

(I would like that all back-references would be generated automatically,
perhaps only indicating if relation is 1:n or n:n).

Erny



----- Original Message -----
From: "Jason Hildebrand" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 6:05 PM
Subject: Re: [Webware-discuss] Middlekit: status of list attributes


> On Thu, 2002-04-04 at 17:30, [EMAIL PROTECTED] wrote:
> > Hi again,
> >
> > I don't see how 'list of Object' attributes are stored in SQL. Although
this
> attribute shouldn't create a column in the table, isn't it necessary to
create
> a new table for representing this 1:n relationship?
>
> >
> > May be it isn't finished?
>
> It's working.   You need to have a "back reference" for it to work.
> Here's an example:
>
> Class       Attribute       Type
> Department
>             name            int
>             employees       list of Person
> Person
>             name            string
>             department      Department      # this is the back reference
>
> If you want an N:N mapping instead, you need to invent a new class
> which represents the relationship.  Example:
>
> Class       Attribute       Type
> Person
>             name            string
>             sports          list of Plays
>
> Sport
>             name            string
>             players         list of Plays
>
> Plays
>             person          Person
>             sport           Sport
>
> Hope this helps.
>
> Jason
>




_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to