Chris, thank you!
the database itself is designed as a relational database would be,
it's quite large actually, I just posted here two tables to illustrate the problem.

The software I am building is a personal one, to help me track my budget. the goal is to import my transactions at the end of every month, and compare it to the budget, and the software will point out the out of budget spending habits so I can either budget them in,
or correct them.

I know other software out there do that, but it's a learning project ... to learn cocoa :) and I want to make it really simple, import, compare, report. that's all.

>>Instead of different types of transactions, transactions always have debits and credits. humm, not in the bank statement, they also have CHECK. and I want to track that too.


I retrieve/create/insert (not quite sure yet :)) an object from the context, and set the values like this.

NSManagedObject *transaction = [NSEntityDescription insertNewObjectForEntityForName:@"Transactions"
                                                 inManagedObjectContext:[self 
managedObjectContext]];

This is inserting a new instance of that entity in the managed object context.

That's how he manual says to insert records, kind of works well, if you do not have relationships. it crashes on me as soon as i have a relationship on the table i want to insert to.



The Transaction(tr) Object Used in the code above is defined like this:

@interface OFXTransaction : NSObject {

Why do you even have this class? It looks like its whole purpose is to replicate what you already have defined in your Transaction entity. You can just use an NSManagedObject subclass to represent one directly.

This class is the class used to import the data from my OFX file, My OFX importer has a class for every section of the OFX specification.


Yes, you will need to insert or fetch an instance of your TransactionType entity. You'll just take that and set it as the value of your Transaction instance's transactionType relationship.

Cool, that's simple.

Hope this helps!

It does thanks Chris.
-- Chris


Sandro.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to