I have a small problem and I was wondering if anyone on this list would know the answer...
I have a relatively simple database and I have a couple of inverse foreign key relationship between some objects.
In my "parent" object I have
<collection-descriptor
name="responses"
element-class-ref="com.blah.blah.beans.Response"
auto-retrieve="true"
auto-update="true"
auto-delete="true"
>
<inverse-foreignkey field-ref="submissionId"/>
</collection-descriptor>I am using the PersistenceBroker interface and when I need to delete a response I delete it with:
Criteria c = null;
Query q = null;
for (int i = 0; i < out.size(); i++) {
Response temp = (Response) out.get(i);
c = new Criteria();
c.addEqualTo("id", Integer.toString(temp.getId()));
q = new QueryByCriteria(Response.class, c);
broker.deleteByQuery(q); }
Now, the response is deleted from the database (I checked). However, when I try to access the page again, it displays the responses there (since I retrieve my submissions and I take all the responses retrieved with the submissions). So, I am not sure how to avoid this behavior. I need to retrieve by submission, not by response, so is there a way to update (I presume) the cache to reflect the changed DB state?
Thanks,
Denis
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
