Rico,

Can you tell us a little bit about why you want to have all these flattened attributes? I religiously avoid them. Since you can use keypaths with KeyValueCoding, I don't often see a use for flattened attributes.

In the relationship from company to address, do you have 'Propagate Primary Key' checked?

What type of attribute is the primary key of Address? Is it a class property?

Do you have the address relationship marked as Mandatory? If you do, EOF will create the relationship and target entity for you, so you should be sure not to replace it (otherwise, you'll have an orphaned EO in the context).

Ken

On Feb 15, 2006, at 6:11 AM, Rico Landefeld wrote:

hi all,

i have the following problem with flattening. i have an address entity in my eomodel wich is used by many other entities like company. company has a
to-one relationship to address. i like to flatten some of the address
attributes into company (address is a weak entitytype). if i insert an
company without filling the address fields there is no insert into the
address table. when some address fields are filled, eof generates an
insert for address but without an primary key and the address relationship
of the company object is empty! i have written an big
EODatabaseContext.Delegate to handle this. is there a better solution?

thank you for your answers!

rico

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/lists% 40anderhome.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to