WhiteJoker
WhiteJoker

Reputation: 37

Core Data temporary relationship

Since the last time I asked a question I've gotten some really good answers, I thought I'd ask another one!

I'm developing an iPad application for representatives of my company to submit orders whilst they are in the field. So my application has Debtors, Addresses, Products and Orders. All debtors have one or more delivery addresses which are being pulled from our ERP system. One of the requirements is that our reps can create a custom delivery address just for that one order. So it should not be attached to a debtor, and should not be able to get selected in future orders for that customer. When the order is deleted so should that address.

At first I thought, well let's just create those delivery address fields in the order table. But that just seems ugly as it will duplicate the existing information for already existing ERP addresses. So I thought, maybe, just maybe it's possible to create an Entity Description which isn't stored in the addresses table, but is saved in the delivery address relationship in the order. I don't know if it makes any sense, but maybe you can shed some light on it, because I can't figure it out.

Thanks!

Upvotes: 0

Views: 71

Answers (1)

svena
svena

Reputation: 2779

It is common practice to copy address information into order object, because it has to retain the original address even if the future address for follow-up orders will be changed.

Upvotes: 1

Related Questions