• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Flattening attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Flattening attributes


  • Subject: Re: Flattening attributes
  • From: Rico Landefeld <email@hidden>
  • Date: Fri, 17 Feb 2006 09:33:20 +0100

Ian Joyner schrieb:

Just hit this same problem with flattened attributes myself. When inserting, it wanted to insert the target record of the flattening as well. I only wanted the flattened attribute to retrieve the attribute from the target record, so I just included it as a routine in the source class:

public String operation_name () {
        return operation ().operation_name ();
    }

You might find this solves some ills.

this is a nice solution if you use custom objects. but in my app we use the input data for analysis purposes only, there is no business logic. so i use generic records.


rico


On 16/02/2006, at 8:20 PM, Rico Landefeld wrote:

Ian Joyner schrieb:

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'.

hi ian, there is not need for to many relationships at this point. my dbcontext delegate seems to work. but its really hacking. i think the flattening feature is meaningful for my use case. but it doesn't work correctly. for more details look at my email to ken.

regards,
rico

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 <mailto:email@hidden>)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden <mailto:email@hidden>




--
__________________________________

Rico Landefeld
Takwa GmbH
Softwareentwickler
Bodelschwinghstr. 25
99096 Erfurt
Tel.: +49 361 6534096
Fax.: +49 361 6534097
eMail: email@hidden <mailto:email@hidden>
WWW: http://www.takwa.de
__________________________________




_______________________________________________ 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
References: 
 >Flattening attributes (From: "Rico Landefeld" <email@hidden>)
 >Re: Flattening attributes (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: WebObjects 5.3.1 Redirect bug?
  • Next by Date: Re: Problem with page encoding
  • Previous by thread: Re: Flattening attributes
  • Next by thread: Re: Flattening attributes
  • Index(es):
    • Date
    • Thread