On 31 October 2011 19:49, Kevin Meyer - KMZ <[email protected]> wrote:

>
> I've made some significant progress - I've been able to put together a
> dual store objectstore that can redirect requests either to the standard
> object store or to Joomla via a REST call,

good to hear.



> but I am now having to deal
> with an annoying quirk:
>
> The bytecode enhancers are making it very difficult for me to update /
> save an object without numerous calls to the object store - Every field
> that is updated causes a call to the objectstore - even while the
> objectstore is loading the object for the first time...
>
> Is it possible to turn off or over-ride the bytecode enhancements for a
> single domain entity class?
>

No... but the approach you should take is to change the ResolveState of the
wrapping ObjectAdapter to RESOLVING while you are rehydrating the object.
 This should cause any changes noticed by the bytecode enhancers to be
ignored.  Once you are finished with the rehydration, switch the
ResolveState back to RESOLVED.

This bit of the framework is always rather complex, so I can't give you
more precise details without digging into the code and reminding myself,
but hopefully it's enough to get you started.

Rob... anything to add?? Have I forgotten any subtleties?



>
> By the way, I'm using some simple http calls and Google's GSon
> library to handle the JSON serialisaton.


I've been using Jackson for the json-viewer, which also works well.



> My entities properties don't
> map nicely onto the remote table, so I'm having to do some manual
> field assignments via an intermediate class (perhaps later I'll find out
> about annotations that'll help me automate this).
>
> Regards,
> Kevin
>
> Cheers
Dan

Reply via email to