Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: nawaf alansari
Added: Oct 9, 2021 11:32 PM
Modified: Oct 9, 2021 11:33 PM
Views: 265
Tags: sqlalchemy
  1. def start_mappers():
  2.     lines_mapper = mapper(OrderLine, order_lines)
  3.     mapper(
  4.         Batch,
  5.         batches,
  6.         properties={
  7.             "allocations": relationship(
  8.                 lines_mapper, secondary=allocations, collection_class=set
  9.             )
  10.         },
  11.     )