That is good info, thanks for sharing. I always have created_at columns, so I assumed you can always save "empty" object.. now I'm actually preferring the "no saving of empty objects" approach :)
Thanks again, and have a great day. Daniel On Jun 22, 9:59 pm, simo <[EMAIL PROTECTED]> wrote: > Hi Richtermeister > > well, I did overwrite nothing actually ..... > I only had a __toString() method to my Provider class. > > But finally, I understood. > It was working well adding a sluugableBehavior on the Provider item > and not working without it. That's why I thought it was related to the > plugin. > > Since I didn't supply any information to the Provider object, there > was nothing to insert (it seems to be the default behavior of > symfony). For others objects I have not supplied anything either but I > have 'created_at' and 'updated_at' fields which triggered the SQL > actions in the DB. > > Hope It can help. > > Many thanks, Richtermeister! > > On Jun 22, 10:28 pm, Richtermeister <[EMAIL PROTECTED]> wrote: > > > Hi Simo, > > > not sure what's happening there. It's certainly not the out-of-the-box > > behavior of propel objects, so I suspect you have some customization > > that messes with the default behavior.. > > For example, did you overwrite the constructor in the Provider? Or the > > save method? > > > Daniel > > > On Jun 22, 10:01 am, simo <[EMAIL PROTECTED]> wrote: > > > > I'm using the sfPropelActAsSluggableBehaviorPlugin and I guess the > > > problem could come from it. > > > > DId anyone had a similar problem using it? > > > > On Jun 22, 1:23 pm, simo <[EMAIL PROTECTED]> wrote: > > > > > I checked objects structures : > > > > > The main difference is that the Provider Object get the '_new' > > > > attribute set to 1. > > > > Why it gets the value set to 1? Do you think it can explain the > > > > problem? > > > > > On Jun 22, 1:00 pm, simo <[EMAIL PROTECTED]> wrote: > > > > > > Hi everybody, > > > > > > When I create an object i'm initializing 3 dependents objects. > > > > > > In /lib/model/myItem.php, I overload the save method(): > > > > > > ANd I initialize my objetcs that way : > > > > > > // Initializing dependent objects > > > > > // object already known as new Indicator - no test > > > > > $assessment = new Assessment(); > > > > > $assessment->save(); > > > > > $this->setAssessment($assessment); > > > > > > $guideline = new Guideline(); > > > > > $guideline->save(); > > > > > $this->setGuideline($guideline); > > > > > > $provider = new Provider(); > > > > > $provider->save(); > > > > > $this->setProvider($provider); > > > > > > Both Assessment and Guideline objects are created but not my Provider > > > > > Object! With no mention of errors. > > > > > I had a look on my log. Of course, there is no trace of the SQL INSERT > > > > > request for providers . > > > > > > When I'm creating a Provider object through myapp/provider/create, > > > > > everything is working well. > > > > > > Do I process a wrong way? > > > > > Any idea of the problem? Many thanks, > > > > > > simo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
