Open valeriy-maslov opened 7 years ago
It would be quite new functionality for the Platypus ORM. This situation pushes us to turn some updates into insert/update/update while applying a change log to a database.
Can you please turn your test project into test case in PlatypusTests
?
I can do it, okay. I'll write you when it will be finished.
This is more like web client part bug. This thing was found while modifying model entity for query with multiple tables connected with
outer join
. The app project with test case will be soon. Right now I can provide only a simple text explanation. Let's say we have 2 tables A & B connected with foreign key. In the project we make a query with this tables joined byouter join
, for this example let's say it isleft outer join
for A & B. App makesrequery()
of this entity and changes some data. While usingleft outer join
there is possibility of empty fields appearing for table B in case of left join, which means that there is no matching record in B. If there is it's okay, we can modify data with no problem. But if there is not matching record, so platypus must insert it into B and update foreign key field in A. But it does not do that, ORM tries to modify nonexist record in B instead.