target table/column in error message raised when
ForeignKey can't resolve target.
be used a little more freely for ad-hoc column
expressions than before. literal_column()
is still the better choice, however.
+
+ - Added full description of parent table/column,
+ target table/column in error message raised when
+ ForeignKey can't resolve target.
- declarative
- if @classproperty is used with a regular class-bound
if _get_table_key(tname, schema) not in parenttable.metadata:
raise exc.NoReferencedTableError(
- "Could not find table '%s' with which to generate a "
- "foreign key" % tname)
+ "Foreign key assocated with column '%s' could not find "
+ "table '%s' with which to generate a "
+ "foreign key to target column '%s'" % (self.parent, tname, colname))
table = Table(tname, parenttable.metadata,
mustexist=True, schema=schema)