Questions regarding OO and N:M relations
"Philipp Marek" <philipp-8mGJuhTcji29ZAADn/[email protected]> Wed, 3 Nov 2010 08:45:16 +0100 (CET)
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
Hello everyone,
I've got a question regarding CLSQL with OO and N:M relations.
I have a table person, and a table hobby. These are related by person2hobby, which has
just the foreign keys stored in it.
The *read* access is not a problem. I use :target-slot, which allows traversing m:n
relations.
But what's missing (for me now) is a setf method on the virtual column.
Example: the person table has a virtual column "»hobbies", which (on read) returns the
related objects from table hobby.
But there's no (setf »hobbies) defined ... so I can't simply (push (»hobbies person1)
(make-instance 'hobby ...)).
Well, of course I could use defmethod myself ... I just wanted to know whether CLSQL
already has a way to do this. CLSQL has most of the needed information, and would
perhaps just need a flag to make a setf method too.
I looked into the manual, but didn't find anything related.
Any help is appreciated.
Regards,
Phil
--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!