Sqlalchemy - Can We Use Date Comparison In Relation Definition?
I have this mapper defined: mapper(Resource, resource_table, properties = {'type' : relation(ResourceType,lazy = False), 'groups' : relation(Group, secondary = model.tables['res
Solution 1:
I have actually found what was wrong. The relation is actually working. The problem was solved by setting the end_date to something like datetime.now() - 1 second, so it happens before the resource is actually refreshed by SQLAlchemy. A milliseconds issue I suppose.
Richard Lopes
Post a Comment for "Sqlalchemy - Can We Use Date Comparison In Relation Definition?"