On Jun 4, 2005, at 7:54 PM, Koen Segers wrote:
> I forgot to say that when i log off and back on with my webapp, the
> tree is
> printed correctly...
This is probably the key to it... Relationship returned by
"getSectionArray()" is somehow not refreshed whenever you change the
sections. So a few questions:
1. How do you insert new sections? Via the same Cayenne application,
or via phpPgAdmin?
2. If the answer is Cayenne, is it done by the same user (and the
same java application) as the one who later views the menus? In any
even, doublecheck that "use shared cache" checkbox is ON for your
DataDomain in the Modeler.
3. If the answer is phpPgAdmin, then Cayenne Java application would
use cached relationship, and you'll observe the behavior you
describe. So you can either live with it (as the stale menu would
only show up until the user logs out), or use a SelectQuery to fetch
sections instead of a relationship. This way no caching would occur.
(BTW the last advise is a general one - it will likely solve your
problem regardless of the cause, however may result in slightly
slower performance)
Andrus
This archive was generated by hypermail 2.0.0 : Sat Jun 04 2005 - 20:04:19 EDT