HaxeFoundation / record-macros

Macro-based ORM (object-relational mapping)
MIT License
49 stars 24 forks source link

Synchronizing the fields #34

Closed filt3rek closed 5 years ago

filt3rek commented 5 years ago

Hej all !

I've encoured a weired bug using Haxe/PHP7. Then I tried on Haxe/PHP5 and all worked fine until I tried to "trace" the fields being deleted in this line : https://github.com/HaxeFoundation/record-macros/blob/master/src/sys/db/Manager.hx#L672 I haven't a global view of what is going on, but reading this code I can see that we delete all the fields of the member class (not only the one used in the DB) and then we just set the fields used in the DB. I think we should just delete the fields used in the DB (not these @:skip ones). And then, I think it's unusefull to delete them because we set them in the next lines. All that to say that when we remove the lines 672 and 673, there is no more bugs for that case. Do you think I'm right or maybe I miss something ?

Thanks for reading,