Re: [sqlalchemy] Re: Elixir question

2012-02-05 Thread Gaëtan de Menten
On 02/03/2012 12:08 PM, lars van gemerden wrote: I should probably make the pair method: def pair(name1, name2): p1, p2 = Pairs(name1), Pairs(name2) p1.other = p2 p2.other = p1 On Feb 3, 11:57 am, lars van gemerdenl...@rational-it.com wrote: Hi, I am trying to sote pairs in a

[sqlalchemy] Re: Elixir question

2012-02-05 Thread lars van gemerden
OK, thank you, I went back to SQLA and came up with this for now (simplified): class Pairs(Base): __tablename__ = 'Pairs' name = Column(String(20), primary_key=True) other_name = Column(String(20), ForeignKey('Pairs.name'),

[sqlalchemy] Re: Elixir question

2012-02-05 Thread lars van gemerden
Sorry, scrap the remark about primaryjoin ... inheritance. INheritance wasn't the problem. On Feb 5, 1:27 pm, lars van gemerden l...@rational-it.com wrote: OK, thank you, I went back to SQLA and came up with this for now (simplified):

[sqlalchemy] Re: Elixir question

2012-02-03 Thread lars van gemerden
I should probably make the pair method: def pair(name1, name2): p1, p2 = Pairs(name1), Pairs(name2) p1.other = p2 p2.other = p1 On Feb 3, 11:57 am, lars van gemerden l...@rational-it.com wrote: Hi, I am trying to sote pairs in a table as follows: