• 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 relationships across multiple databases [:|)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Many To Many relationships across multiple databases [:|)


  • Subject: Re: Many To Many relationships across multiple databases [:|)
  • From: Brent Shank <email@hidden>
  • Date: Thu, 27 Feb 2003 10:38:07 -0800

Here's a bit that from the EO book that may shed some light:

http://developer.apple.com/techpubs/webobjects/Enterprise_Objects/ Connecting/chapter_10_section_8.html

Brent

On Wednesday, February 26, 2003, at 11:39 AM, Jonathan Rochkind wrote:

At 09:04 AM 2/26/2003 -1000, Art Isbell wrote:

That's my experience as well even under WO 5.2. Flattened relationships generate SQL join statements. When the tables involved in the join are in different databases, many databases will generate an error because they don't support joins across tables in different databases.

Interestingly, in MS SQL Server you can do a cross-database join, as long as the 'databases' are in the same SQL Server Instance. You just need to put the 'dbo.' prefix in front of the table name in the EOModel, and EOF ends up generating valid SQL code for cross-db joins in MS SQL Server. I've used this trick to succesfully do other things that would make EOF try a cross-db join with MS SQL Server. (relationship-pre-fetching and qualifying-across-relationship-keypath with relationships that span models/dbs comes to mind).


But cross-model/db flattened many-to-many STILL doesn't work, raising mysterious EOF errors. So there's something else going on that makes this not work, other than the cross-db join. What that is, I don't know, I just know I learned not to bother trying.

--Jonathan


I've been able to create a many-to-many relationship across eomodels by very carefully manually copying the configuration of a many-to-many relationship created by EOModeler between 2 entities in the same model. EOModeler won't create a many-to-many relationship across different eomodels. But I've omitted the flattened relationships and made the relationships underlying the flattened relationships class properties when I will be traversing these relationships in my app. Somewhat clunky, but it works.

Art
http://homepage.mac.com/aisbell/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: connect to db timeouts?
  • Next by Date: Re: Join many to many problem
  • Previous by thread: Re: Many To Many relationships across multiple databases [:|)
  • Next by thread: WOPopUpButton Used For A Search
  • Index(es):
    • Date
    • Thread