Hi Tore,
> aPerson.getHairstyle()
This line will used a cached hairstyle instead of triggering a query
because of uniquing. If a hairstyle for a particular ID is already in
the DataContext, Cayenne knows how to get it in this case. So it is
magic :-)
Andrus
On Dec 10, 2003, at 8:42 AM, Tore Halset wrote:
> One more thing...
>
> As described, the persons are fetched by a SelectQuery. I do not
> understand (from the documentation) how it will prevent prefetching
> when I do a
>
> aPerson.getHairstyle()
>
> I do not have a obj-property for hairstyle on person, but the relation
> are defined. Should I define the obj-property for hairstyle on person
> and use that to find a hairstyle-object in a preloaded list?
>
> I do understand how the preloaded hairstyles will help me when I want
> to create new persons.
>
> - Tore.
This archive was generated by hypermail 2.0.0 : Fri Dec 12 2003 - 01:40:14 EST