Re: Flattening attributes
Re: Flattening attributes
- Subject: Re: Flattening attributes
- From: Ian Joyner <email@hidden>
- Date: Thu, 16 Feb 2006 10:05:11 +1100
The problem I have found with flattened attributes is that they seem
to work fine for one thing but not for another. You have to test them
out on all four CRED operators (create, read, edit, delete). Often I
find that EO generates strange errors about inv paths not being found
when deleting, etc. I have tried them out in order to perform joins
to make access more efficient, but usually some other problem turns
up. Perhaps I'm just not proficient at them yet.
Your design also seems a little restrictive, large companies can have
multiple addresses, so shouldn't you make this a to-many relationship
– in that case flattened attributes will not be possible and will
just make your design less flexible for future 'feature requests'.
On 15/02/2006, at 10:11 PM, 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?
Whoa, that definitely seems like a bad idea, but maybe those who are
further down the track than I could advise (who said "if you are
writing code in EO, you are doing it wrong"). Have you tried 'Owns
destination' and 'Propagate primary key' in the advanced relationship
pane in EOModeler. But be careful, you have to understand the
semantics of these exactly.
Ian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden