[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Design issue for MVC and database updates
- Subject: Design issue for MVC and database updates
- From: jocked at chello.se (Joakim Danielson)
- Date: Tue Mar 2 11:16:57 2004
Hello
I'm on my way of implementing my first own application in
Cocoa/Objective-C. I've just implemented a window with master-detail
layout using a NSArrayController that works against a database.
Here is the issue:
I have a function that stores the rows in my array (bound to
NSArrayController) to the database with insert or update commands. The
problem is that all old objects get updated in the database even if the
have not been update in the GUI. So I need some kind of dirty flag to
keep track of objects that have really changed.
Where should I implement this flag? Can I somehow use NSArrayController
for this or my controll object?
I would prefer to handle it in the controll layer and not in the model
layer.
Joakim Danielson