shuiyouren / sqlitepersistentobjects

Automatically exported from code.google.com/p/sqlitepersistentobjects
0 stars 0 forks source link

Objects should start life as Dirty #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an object that is a subclass of SQLitePersistentObject
2. Initialize various instance variables in init using the member variables
3. Call save on the object
4. Nothing saved because nothing marked dirty because the observer was
never called.

What is the expected output? What do you see instead?
Expected to see the object saved but instead nothing is saved

What version of the product are you using? On what operating system?
Trunk at rev 62.

Please provide any additional information below.
The dirty instance variable in SQLitePersistentObject should be initialized
to YES in init rather than NO. Any newly instantiated object should be
considered to be dirty.

Original issue reported on code.google.com by baron.ro...@gmail.com on 8 Feb 2009 at 4:37

GoogleCodeExporter commented 8 years ago
I agree objects should be dirty when created. Currently they are only saved when
their properties get modified

Original comment by amle...@gmail.com on 10 Feb 2009 at 12:54

GoogleCodeExporter commented 8 years ago
This seems to have been addressed in rev64, but I think that it's a bit wrong 
now that there's a property called 
'dirty' as that means all tables end up having a 'dirty' column which is always 
0. It also means that you can't ever 
have a real property of an SQLitePersistentObject being called 'dirty'.

Original comment by mattjgal...@gmail.com on 15 Feb 2009 at 10:51

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Original comment by amle...@gmail.com on 17 Feb 2009 at 11:40