Re: Many-to-many relationship code example?
Re: Many-to-many relationship code example?
- Subject: Re: Many-to-many relationship code example?
- From: Arturo PĂ©rez <email@hidden>
- Date: Thu, 28 Jul 2005 21:20:20 -0400
Did you fill in the table and column names for the join table?
EOModeler doesn't do that.
-arturo
On Jul 28, 2005, at 7:15 PM, David Schneider-Joseph wrote:
That's exactly what I did. When I then try to generate the SQL code I
get the error as described below.
On Jul 28, 2005, at 7:12 PM, Robert Walker wrote:
David,
How did you create your many-to-many relationship? Did you use the
"Join in Many-to-Many" option from the "Property" menu, or did you
create it manually?
Say you have a "Person" entity and a "Department" entity that you
want to join in many-to-many:
Select both entities in the right-hand pane of EOModeler and choose
"Join in Many-to-Many" from the "Property" menu.
This will create the join table for you and all the necessary
relationships with nearly proper settings for a basic "flattened"
many-to-many join. All you have to do then is go in and finish the
process, but providing some external names and renaming things to fit
your needs.
If you did not use this method go back and try it. Then see if you
have the same error.
I almost always use this method to create my many-to-many joins then
I roll back the flattening if I want to have exposed attributes in
the join table and turn on the class properties as necessary.
Good luck.
On Jul 28, 2005, at 6:19 PM, David Schneider-Joseph wrote:
Is there a working example of a many-to-many relationship
implemented in an EOModel? When I try to generate the SQL for one
in EOModeler, and "Primary Key Constraints" is checked, I get the
following error:
An unexpected error has occurred which may cause EOModeler to
malfunction. You may want to save copies of your open documents
and quit EOModeler.
Error: NSInvalidArgumentException: *** -[NSCFDictionary
setObject:forKey:]: attempt to insert nil value
Stack Trace:
NSInvalidArgumentException: *** -[NSCFDictionary
setObject:forKey:]: attempt to insert nil value
at
com.apple.cocoa.foundation.NSMutableDictionary.setObjectForKey(Nativ
e Method)
at
OpenBasePlugIn$OpenBaseSynchronizationFactory.primaryKeyConstraintSt
atementsForEntityGroup(OpenBasePlugIn.java:237)
at
EOSynchronizationFactory.primaryKeyConstraintStatementsForEntityGrou
ps(EOSynchronizationFactory.java:529)
at
EOSynchronizationFactory.schemaCreationStatementsForEntities(EOSynch
ronizationFactory.java:862)
at
EOSynchronizationFactory.schemaCreationScriptForEntities(EOSynchroni
zationFactory.java:663)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
David Schneider-Joseph
http://www.davidsj.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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