Hi, is it possible to define a relationship over a column property?
the column property returns an id, and it would be nice to get the related object via a relationship easily. I've tried a couple of things, but the didn't work out, like: production_request_id = column_property( select([ProductionRequests.id])\ .where(ProductionRequests.id==cast(func.substring(nr_proforma, 3), Integer))\ .where(ProductionRequests.type==func.substring(nr_proforma, 1, 2)), deferred=False ) production_request = relationship(ProductionRequests, primaryjoin=production_request_id==ProductionRequests.id) gives ArgumentError: Could not determine relationship direction for primaryjoin condition 'documenteiesire."IDDoc" = :IDDoc_1', on relationship ProductionOrders.production_request. Ensure that the referencing Column objects have a ForeignKey present, or are otherwise part of a ForeignKeyConstraint on their parent Table How could I define a ForeignKey as there is no real column? thanks, Viktor -- 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.