Em Sex, 2002-04-12 �s 12:56, Steve Knight escreveu:
> I think I have discovered another deficiency in Value Objects.
> If I have two value objects for an entity (NormalValue and LightValue) and I
> make a call to the bean's setNormalValue( ), should the changes not be made
> to the LightValue object as well (the changes that are applicable to both,
> that is)?

Wrong. Value Objects are a "snapshot" of the entity bean in the moment
they're requested. Further entities to the bean or other VO's won't
update the existing VO's. The programmer needs to request the VO again
(bean.getNormalValue() or getLightValue(), using your example).

ValueObjects are intended to be a light, value-only (no references) view
of the entity bean on the client side. A Value Object makes no
references or calls to the entity bean.

I'm sure the current VO implementation has many bugs and deficiencies.
But this is not one of them.

-- 
Ja ne,
   Pazu
   mailto: [EMAIL PROTECTED]

Anime Gaiden: de f�s para f�s, sempre.

Attachment: signature.asc
Description: PGP signature

Reply via email to