Joaquin Arias Buendia <joaqinbuendiaforu..ahoo.es> wrote:
> This is a function to delete a ballot:
>
> public void eliminarVotacion(int idVotacion)
> {
> Votacion v = (Votacion) persistenciaIVoting.
> getVotacionCod(new Integer(idVotacion));
> persistenciaIVoting.deleteObject(v);
> persistenciaIVoting.commitChanges();
> }
>
> Whe a reload the web page, the erased ballot is still
> there!. But if I restart Tomcat server it isn't there.
> Any solution?
How is the List created that's used to display the ballots?
You can either manually remove the ballot from that list in
eliminarVotacion(),
or you could refetch the list from the database,
or you could make sure you're using the list relationship and Cayenne's
deletion rules in such a way as to automatically remove the object from the
list.
-Mike
This archive was generated by hypermail 2.0.0 : Wed Dec 01 2004 - 13:08:58 EST