Cross between MightHave and HasMany?

[prev] [thread] [next] [Date index for 2004/11/02]

From: Jess Robinson
Subject: Cross between MightHave and HasMany?
Date: 19:47 on 02 Nov 2004
Hi folks,

I have a setup similar to:

create table person (
    personid int primary key auto_increment,
    firstname varchar(32),
    initials varchar(16),
    surname varchar(64),
    date_of_birth datetime
  );

create table categories (
    catid int primary key auto_increment,
    category varchar(128)
  );

create table personcategories (
     personid int,
     catid int
);

So I've been looking for a way to say 'person might have a category, via  
table personcategories', I can't see way to do it using existing  
relationship types, or am I missing something? Essentially I'd like  
$person->category() and $person->category($catobj) to do the right thing.

Also I'd like to be able to remove the relationship, without deleting  
either the person or the category themselves.

Any ideas?

Jess

        -- 
        Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

(message missing)

Cross between MightHave and HasMany?
Jess Robinson 19:47 on 02 Nov 2004

Re: Cross between MightHave and HasMany?
Kingsley Kerce 20:08 on 02 Nov 2004

Re: Cross between MightHave and HasMany?
Jess Robinson 21:20 on 02 Nov 2004

Re: Cross between MightHave and HasMany?
Kingsley Kerce 21:35 on 02 Nov 2004

Re: Cross between MightHave and HasMany?
Jess Robinson 22:09 on 02 Nov 2004

Re: Cross between MightHave and HasMany?
Tony Bowden 23:43 on 02 Nov 2004

Re: Cross between MightHave and HasMany?
Peter Speltz 22:06 on 02 Nov 2004

Re: Cross between MightHave and HasMany?
Kingsley Kerce 22:39 on 02 Nov 2004

Re: Cross between MightHave and HasMany?
Jess Robinson 06:35 on 03 Nov 2004

Re: Cross between MightHave and HasMany?
William McKee 14:21 on 05 Nov 2004

Re: Cross between MightHave and HasMany?
Peter Speltz 14:36 on 05 Nov 2004

Re: Cross between MightHave and HasMany?
Jess Robinson 20:06 on 05 Nov 2004

Re: Cross between MightHave and HasMany?
William McKee 03:34 on 06 Nov 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52