On Tue, Mar 23, 2010 at 11:54 AM, Joe Baldwin <jfbaldwi..arthlink.net> wrote:
> I have a question about management & usage of the data objects generated by Cayenne Modeler (CM).
>
> It is clear that the CM auto-generates classes that represent the entities built using CM (with the underscore prefix). In addition, it auto-generates a sub-class. Also, when any change is made via CM, the sub-classes are regenerated.
CM isn't supposed to regenerate the subclass, only the superclass (the
one with the underscore prefix).
> I am a little unclear as to the intended management/usage of this sub-class. Any changes made to the auto-gen sub-class would be lost when the next CM change is made. So this leaves me with two options: I can either sub-class the sub-class (which does not look like the intended usage of the CM's work), or I can make a separate directory structure with the subclasses and then replace the auto-gen dir of sub-classes (which again does not look like the intended best use of the CM's work).
You are supposed to be able to safely put code in the subclass without
it being overwritten. If your subclass IS being overwritten, you have
a different issue going on. CM will, however, create the subclass for
you automatically if it doesn't already exist, but after that, it
should be hands-off.
> So this leaves me with the notion that I may be misunderstanding how to manage the sub-classes and make permanent changes that will exist past the next CM code generation procedure.
>
> Thanks,
> Joe
>
>
This archive was generated by hypermail 2.0.0 : Tue Mar 23 2010 - 12:10:18 EDT