Re: difficulties with cross-model relationship
Re: difficulties with cross-model relationship
- Subject: Re: difficulties with cross-model relationship
- From: Chuck Hill <email@hidden>
- Date: Fri, 20 Mar 2009 11:58:29 -0700
On Mar 20, 2009, at 11:49 AM, TW wrote:
On Mar 20, 2009, at 7:31 AM, Chuck Hill wrote:
On Mar 19, 2009, at 11:38 PM, TW wrote:
All:
I have an entity called "Paper" in a new model A that I would
like to relate to an entity "Employee" in an established model B.
Each of them are in their own framework project but both models
use the same database. I was hoping to make this a many to many
and flatten it. I've tried many things tonight to get this to work
but apparently I'm doing all the wrong things.
Apple's documentation seems to indicate that I should be able to
resolve type references to any models included in the model group.
I've added B eomodel to the model group section in my EOGenerate
file.
I've tried adding B.framework the build path of A.framework. This
seems to do the right things and add the join table, etc., but
then model B can't resolve type references to the entity in model
A. I'm assuming I'm just really confused about how this should
work but I've reached my limit for banging my head against it.
I'd be really grateful if anyone doing something similar could
share how they may have gotten this working.
It sounds like you have a circular dependancy: Framework A depends
on Framework B _and_ Framework B depends on Framework A. That just
won't work in Java. I think you can only do this if the
relationships are only in one direction or if both models are in
the same project.
Chuck
Thanks Chuck. I actually did avoid that happening since I've only
added the existing framework to the new framework (and not the
reverse). The problem I see on my end is that everything seems to
work - relationship add, flattening, etc., but then when I clean
everything the older framework does not retain visibility to the
types in the newer one.
What you are writing does not seem to be consistent. If you "added
the existing framework to the new framework" then it does not make
sense to expect "the older framework to retain visibility to the types
in the newer one". The new can see the existing, not vice versa.
Maybe if you describe the problem in specifics with the real names
that may help to clarify things.
I think I have a problem with approach. I think the best approach
may be to sub-class my user types in a third framework? I've been
putting this off. :-)
I am really not sure what you are doing and what you are seeing so it
is hard to advise you on the best direction to take.
Chuck
--
Chuck Hill Senior Consultant / VP Development
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden