On 04/02/2010 11:07, King Simon-NFHD78 wrote:
...
Just to confirm, were you actually defining your Region_D class exactly
like this:
class Region_D(Base, CreateUpdateMixin):
__tablename__ = u'regions_d'
id = sa.Column(sa.Integer(), sa.Sequence('regions_d_id'),
primary_key=True, nullable=False)
name = sa.Column(sa.String(length=50, convert_unicode=False))
countries_d_id = sa.Column(sa.Integer())
country = sao.relation(Country, backref='region_d',
primaryjoin=countries_d_id == Country.id)
Ie. Neither the class nor the primaryjoin parameters in the relation
were strings? I would be surprised if you got the exception you
described (expression 'Country' failed to locate a name ) if you had
done that, because SA wouldn't be trying to look up that name.
Oops, I had left the primaryjoin as a string.
Simon, thanks for catching this.
There is now a much bigger light at the end of the tunnel.
Werner
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.