[Maypole] relationships ?
Alex McLintock
alex@owal.co.uk
Thu, 03 Jun 2004 16:32:46 +0100
raptor tvXXXXXt.net wrote:
>a users has address on uid
>a users has address
>a users has uid on address
>a address has user
>
>
>
Yeah, I was confused by this.
Part of the problem lies in the fact that we seem to have tables with
plurals as names ie table "users" instead of "user".
Have you specified that uid is the primary key?
>how to make it... can I use Class::DBI directly instead of this :
>
>
The docs have an example of how you might create a package specifically
for this...
I think it is here
http://maypole.simon-cozens.org/doc/Request.html
>DB::Addr->has_a(uid => 'DB::User');
>
>
I think that if you want to do it that way then you can. There is no
*need* to use Class::DBI::Loader:: Relationship
AFAIK
I think you might want to create a trivial package like this...
package DB::Addr;
DB::Addr->has_a(uid => 'DB::User');
sub foo :Exported {}
Ok I am not too clear I understand either.