• 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: Many-to-many relationship code example?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Many-to-many relationship code example?


  • Subject: Re: Many-to-many relationship code example?
  • From: David Schneider-Joseph <email@hidden>
  • Date: Thu, 28 Jul 2005 19:15:07 -0400

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 (Native Method)
at OpenBasePlugIn $OpenBaseSynchronizationFactory.primaryKeyConstraintStatementsForEnt ityGroup(OpenBasePlugIn.java:237)
at EOSynchronizationFactory.primaryKeyConstraintStatementsForEntityGrou ps(EOSynchronizationFactory.java:529)
at EOSynchronizationFactory.schemaCreationStatementsForEntities (EOSynchronizationFactory.java:862)
at EOSynchronizationFactory.schemaCreationScriptForEntities (EOSynchronizationFactory.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: This email sent to email@hidden
  • Follow-Ups:
    • Re: Many-to-many relationship code example?
      • From: Arturo PĂ©rez <email@hidden>
References: 
 >Many-to-many relationship code example? (From: David Schneider-Joseph <email@hidden>)
 >Re: Many-to-many relationship code example? (From: Robert Walker <email@hidden>)

  • Prev by Date: Re: Many-to-many relationship code example?
  • Next by Date: Re: Many-to-many relationship code example?
  • Previous by thread: Re: Many-to-many relationship code example?
  • Next by thread: Re: Many-to-many relationship code example?
  • Index(es):
    • Date
    • Thread