ufront / ufront-orm

The Object Relational Mapper, allows easy, type-safe access to your database. Builds on Haxe's SPOD but adds macro powered relationships, validation and client side usage
MIT License
13 stars 4 forks source link

Custom serialization useCache enumIndex #32

Open filt3rek opened 5 years ago

filt3rek commented 5 years ago

Hej Jason,

I've looked at the hxSerialize function on the ufront.db.Object and there are 2 mistakes I think : useCache and enumIndex can't be set in this custom function because the serializer has yet done with "useCache" before entering in this function. It ends with strange behaviours when dealing with circular references... (I think this issue is linked too : https://github.com/ufront/ufront-orm/issues/30) The only thing to do is to set the static global USE_CACHE or rework the remoting HttpConnection.processRequest (and handleRequest) in order to set from the client these values useCache and enumIndex for the Serializer instance that works for the remoting...

That said, I see that Ufront is no longer maintened, I hope you're fine, all is ok.

Regards, Michal