On Oct 20, 2013, at 7:00 PM, [email protected] wrote: > > > I do, but it doesn't work: > > NoForeignKeysError: Could not determine join condition between parent/child > tables on relationship Uno.duos - there are no foreign keys linking these > tables. Ensure that referencing columns are associated with a ForeignKey or > ForeignKeyConstraint, or specify a 'primaryjoin' expression.
>
> (The database is not case sensitive - so that can be discounted.)
we're talking here about identifier names - if you were to say, directly to SQL
server:
select id from uno
or
select ID from UNO
those come out to be the same thing from SQL server's perspective. However, if
you say:
select [ID] from [UNO]
the quoting ([] in SQL server) means you want that exact casing. if your
tables were created as:
CREATE TABLE [UNO] ([ID] INTEGER)
then those names in upper case with the quoting needs to be used. it sounds
like this is how your database was set up, or at least the columns related to
this foreign key.
>
> >>> DuoDuo.__table__
> Table('duo_duo', MetaData(bind=None), Column(u'ID', INTEGER(),
> table=<duo_duo>, primary_key=True, nullable=False,
> default=Sequence(u'ID_identity', start=1, increment=1,
> metadata=MetaData(bind=None))), Column(u'STUFF', NVARCHAR(length=50),
> table=<duo_duo>), schema=None)
the names are case-sensitive uppercase, so yeah.
signature.asc
Description: Message signed with OpenPGP using GPGMail
