views:

72

answers:

4

Hi,

Reading the bottom of this document, specifically:

"You can still retrieve properties of deleted objects, but you cannot save deleted objects."

what the heck? how?...is it only if you enable a setting?

http://propel.phpdb.org/docs/user_guide/chapters/ManipulatingObjects.html#ManipulatingObjects.Deleting

explanation would be appreciated :) Andrew

A: 

A deleted object is just deleted in the database and flagged as being deleted. You can still access it in php, for example to display some goodbye data to the user ("Product XYZ was deleted").

Sebastian Dietz
A: 

I think by 'object' it is referring to the object that has already been loaded into memory. It's saying you can still look at its attributes, but if you try to call save it will try to execute an UPDATE SQL statement which will fail because the record has actually been deleted.

sjbotha
A: 

where is all this data stored?...what if I delete a million records...for how long will they be available?

Andrew
A: 

I'm not very familiar with the exact workings of Propel. But it is important to understand the difference between the database (MySQL) and the ORM layer (Propel). Propel is an abstraction that represents rows from the database by wrapping them in objects. You may then change or delete such rows by calling a method on the corresponding object and Propel will generate and execute the SQL statement needed.

So, after the SQL DELETE statement was executed the object wrapper will still hold the data that was loaded before the row was deleted. But it will no longer allow you to modify the row data, because there is no place that Propel could write those changes to.

cg
ahhh...so the object is only deleted in the database....but remains in the ORM...makes sense.thanks,Andrew(and thanks everyon)
Andrew