Hi guys

I'm revisiting this issue. I really don't like the work around I
suggested above. Also, I'm having to revisit some live code which will
be a real headache to refactor the m2m logic into o2m + m2o.

A new work around I'm thinking of is as follows:
1. Add customer methods for getters and setters for the extra columns
I need to access.
2. Add a decorator with a configure() method which queries the DB with
the Id of the current object and gets the extra column values in the
m2m table.
3. Within the configure() call each customer setter.

Is it a bad idea due to have SQL query in a decorator configure
method? I assume it will only be called once per object.

I know the columns won't be saved when I call the save() method
however various triggers on the database populate these fields anyway.

Cheers
Matthew

On Jul 27, 11:59 am, Mark Mandel <mark.man...@gmail.com> wrote:
> You have it right, sir! :)
>
> On Mon, Jul 27, 2009 at 11:46 AM, Matthew <matthewbchamb...@gmail.com>wrote:
>
>
>
>
>
> > Hi all
>
> > Am I right that with a Transfer m2m object you can't access columns in
> > the DB other than the 2 FKs of the join table? Example: you have a
> > Permissions table and a User table and a join table in between, but on
> > the join table you have more columns than just the 2 FKs how do you
> > access these in a Transfer m2m?
>
> > I'm guessing the only work around is to have the join table as an
> > object and then have a o2m from tableA to the join table and then a
> > m2o to tableB.
>
> > Cheers
> > Matthew
>
> --
> E: mark.man...@gmail.com
> T:http://www.twitter.com/neurotic
> W:www.compoundtheory.com
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to