You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Throws: Data error Missing relationship from Parent Provider: <Payment> to child Allocation: <class 'database.models.PaymentAllocation'> of class: PaymentAllocation.
Root cause is in LogicRow:
deflink(self, to_parent: 'LogicRow'):
""" set self.to_parent (parent_accessor) = to_parent Example if logic_row.are_attributes_changed([Employee.Salary, Employee.Title]): copy_to_logic_row = logic_row.new_logic_row(EmployeeAudit) copy_to_logic_row.link(to_parent=logic_row) # link to parent Employee copy_to_logic_row.set_same_named_attributes(logic_row) copy_to_logic_row.insert(reason="Manual Copy " + copy_to_logic_row.name) # triggers rules... Args: to_parent: mapped class that is parent to this logic_row """parent_mapper=object_mapper(to_parent.row)
parents_relationships=parent_mapper.relationshipsparent_role_name=Nonechild=self.rowforeach_relationshipinparents_relationships: # eg, Payment has child PaymentAllocationifeach_relationship.direction==sqlalchemy.orm.interfaces.ONETOMANY: # PAeach_parent_role_name=each_relationship.back_populates# eg, PaymentAllocationListchild_row_class_name=str(child.__class__.__name__) # eg, PaymentAllocationchild_reln_class_name=str(each_relationship.entity.class_.__name__) # eg., PaymentAllocation# if child_row_class_name == child_reln_class_name: FIX..ifisinstance(child, each_relationship.entity.class_):
ifparent_role_nameisnotNone:
raiseException("TODO - disambiguate relationship from Provider: <"+to_parent.name+"> to Allocation: "+str(type(child)))
parent_role_name=parent_mapper.class_.__name__ifparent_role_nameisNone:
raiseException("Missing relationship from Parent Provider: <"+to_parent.name+"> to child Allocation: "+str(type(child)) +" of class: "+child.__class__.__name__)
isInstance fails due to packed name in SQLAlchemy meta data expecting a nodal name.
Fix: LogicBank==1.4.3
Replacing isInstance fixes this bug.
The text was updated successfully, but these errors were encountered:
See the Allocation sample.
Throws:
Data error Missing relationship from Parent Provider: <Payment> to child Allocation: <class 'database.models.PaymentAllocation'> of class: PaymentAllocation
.Root cause is in
LogicRow
:isInstance
fails due to packed name in SQLAlchemy meta data expecting a nodal name.Fix: LogicBank==1.4.3
Replacing
isInstance
fixes this bug.The text was updated successfully, but these errors were encountered: