On May 12, 2008, at 10:03 AM, David Avendasora wrote:

Yeah, it's giving me a queasy feeling too. Mix it in with Java Client and it gets even more nauseating.

The basics of what I'm trying to do is I have Parts that each have at least one BillOfMaterial Each BillOfMaterial has 0 or more Components. These Components are each a certain quantity of another Part and can themselves have a BillOfMaterial which may have more components. These components can then have BOMs as well, and so on, and so on. The structure is somewhat more complicated, but this should give you a good understanding of what the issue is.

I am using an inner class to store Summerized Components which are then stored in an array on the given Part. I don't want to persist these objects as they are really a convenience so I don't have to traverse the the object graph constantly. The first time it is requested, if the components() array is null, it will generate them by working it's way down through the object graph and summing up the quantities, adjusting units of measure, etc. So in the end I have a array of Components with the total quantity of each required to make the given Part.

It seems to work, but since it just feels "icky", I wanted to run it past the list in hopes of some validation or "are you bleepin' nuts!?" type comments.

Well, that does not sound so back. JavaClient may throw a spanner into it. What you are doing in caching expensive values in an EO. I do that, it works. You just need to be careful to invalidate the cache at the right time. This can be even tricker when multiple EOs are involved.

Chuck


On May 12, 2008, at 12:41 PM, Chuck Hill wrote:


On May 12, 2008, at 1:34 AM, David Avendasora wrote:

Hi all,

Is it possible to use Inner Classes inside EOs? Since they are Inner, are they automatically in the same EditingContext as the EO they are inside of? I would think so, but I just want to make sure.

It would probably have access to the EC, but the EC would not have it as a registeredObject. Not sure where you are going here, but it is giving me a queasy feeling.

Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects










--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
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