Hi all, I've just gone back to work on a ROP application I have and am again running into the issue of having to duplicate code between the server model subclasses and the client model subclasses. I've got a way of working around that, but I'm thinking this is probably best handled by Cayenne. In particular, I really don't think that there should be two class hierarchies for what amounts to a boolean field (remote/not remote).
I think the generated superclass should perform the duty of calling the appropriate method for reading and writing properties. I think this would advocate adding an isRemote() method to the ObjectContext interface to avoid having to do instanceof operations. There would have to be some sort of unification between PersistentObject and CayenneDataObject as well. My naïve guess is that the latter could extend the former, but I haven't investigated whether or not they are compatible. Does this sound like a reasonable approach? If so, I'll probably dig in on that. Thanks, Kevin
