I have two tables whose names I chose by using sqlmeta.

    class Person(SQLObject):
        class sqlmeta:
            table = 'city_person'
        name = StringCol()
        pets = MultipleJoin('Animal')

    class Animal(SQLObject):
        class sqlmeta:
            table = 'city_animal'
        name = StringCol()
        owner = ForeignKey('Person')

Now if I say
    bob = Person.get(1)
    bob.pets
an error occurs because the table `city_animal` has no column
named `city_person_id`.
The real name in table `city_animal` is `person_id` and that
works very well for the foreign key `owner`. But it does not
for the MultipleJoin `pets`.

I've studied the documentation but didn't find a clue about
how to force the correct naming. Could you give me a hint.

Thank you

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to