On 21 Apr 2009, at 17:09, Gary Stevens wrote:
Hello all,
I am working with Shindig to make my version work with a persistent
database and have another question. When looking at the PersonDb
class, in
the populateDbFields() method it seems like all of the data stored
as type
List<String>, such as a person's favorite books or quotes, is
supposed to
be stored as PersonPropertyDb objects in a database table called
person_properties. When the loadTransientFields() method is called,
all of
that data should be pulled out of the person_properties table and
used to
reinitialize some of the instance variables of the PersonDb class,
such as
List<String> books and List<String> quotes.
yes, thats correct its triggered by the @postLoad annotation.
However, when I try to build my database the person_properties table
is
empty and none of the data from the transient columns is saved
anywhere in
my database. Is my understanding of how PersonDb works right and the
implementation is just incomplete? Or do I not understand how
PersonDb is
supposed to persist those fields of data?
populateDbFields will be called just prior to persist on the
@PrePersist annotation,
resulting in the transient fields being synced with the
PersonPropertyDb field.
Ian
Thank you,
Gary F Stevens