Re: Cayenne in a framework -> Value Objects

From: Bryan Lewis (brya..aine.rr.com)
Date: Fri Jul 09 2004 - 11:22:30 EDT

  • Next message: Bryan Lewis: "Re: Cayenne in a framework -> Value Objects"

    Fredrik Liden wrote:
    >
    > Can I use the classes that Cayenne generates as ValueObjects/Transfer
    > Objects objects or do I need to generate VO objects from the Cayenne
    > classes in the same way that EJB does?

    I was using EJB's with value objects (I happened to call them data
    objects) before I switched to Cayenne. There's no need to generate them
    yourself. Essentially Cayenne's DataObjects _are_ value objects, as
    suggested by their name. They take the data from the database and
    package it as nice javabean-type objects. You can call their accessor
    methods as much as you like; no more database trips will be made until
    you explicitly request it by calling, for example,
    dataContext.commitChanges().

    Switching to Cayenne removed a lot of plumbing work for me.



    This archive was generated by hypermail 2.0.0 : Fri Jul 09 2004 - 11:21:48 EDT