http://www.doctrine-project.org/projects/orm/1.2/docs/manual/event-listeners/en#dql-hooks
scroll down a little bit to the line: $event->skipOperation(); This should do what you want? Daniel On 27.05.2010, at 16:41, comb wrote: > Hey thanks, but it does not work :-( > class FloodCheckListener extends Doctrine_Record_Listener > { > //... > public function preInsert(Doctrine_Event $event) > { > return false; > } > } > The record is saved anyway. > > > On 27 Mai, 16:26, Robert Schoenthal <seros...@googlemail.com> wrote: >> he, >> >> try to "return false" in your preInsert Method, it think it should >> work >> >> On May 27, 12:39 am, comb <sa...@gmx.net> wrote: >> >>> Hi, >> >>> i'm writing a CheckFloodable-Behavior. >>> Before a new record is saved, I would like to prevent the insertion of >>> the new record if the user did not wait long enough. >>> It's very dirty since I use the sfContext::getInstance() quite much, >>> but my question is, how would one prevent the insertion? is it ever >>> possible`to prevent it within a listener or do I have to write a check >>> in every new/create action if the model?? >>> I tried a redirection within the listener, but the record is inserted >>> anyway... >> >> > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en