• 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: Splitting an EOModel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Splitting an EOModel


  • Subject: Re: Splitting an EOModel
  • From: "Cheong Hee (Gmail)" <email@hidden>
  • Date: Thu, 11 Nov 2010 22:00:03 +0800

Dear Dave

I thought this may work. Copy and paste the entities first without their relationships. After all entities exist, then go back and copy and paste their respective relationships. The issue "may be" if there is many-to-many join table. By doing this, you at least able to copy over quite some entities and left fewer relationships to patch up.

Cheers

Cheong Hee

----- Original Message ----- From: "David Avendasora" <email@hidden>
To: "Farrukh Ijaz" <email@hidden>
Cc: "WebObjects-Dev Mailing List List" <email@hidden>
Sent: Thursday, November 11, 2010 8:27 PM
Subject: Re: Splitting an EOModel



Thanks Farrukh,

I was hopping not to be messing around in the plists, but... sigh. It does work to work within Eclipse, but you have to work in the Navigator view where you can get to the .plist files, not that this is much better than working in the finder.

The biggest issue with working in the finder is that when I try to search the .plist files for the schema name that I want to move so I can find all the entities, spotlight apparently doesn't index .plist files so it doesn't find any. At least with Eclipse I can get a list of the plist files that are for the schema I want to split off.

It would be so much easier if Entity Modeler didn't kill any relationships where it can't find the destination entity in the same model when pasting. I'll create a Jira bug ticket.

Thanks again, Farrukh.

Dave


On Nov 11, 2010, at 4:17 AM, Farrukh Ijaz wrote:

Hi David,

Commets below:

Farrukh

On 2010-11-11, at 1:51 AM, David Avendasora wrote:

Hi all,

I've got an EOModel that spans several schemas in the database and I'd like to break it into several schema-specific EOModels. There seems to be no easy way to move Entities out of one model and into another other than copy-paste, but copy-paste doesn't modify the relationships to point back to the original model that the entities were copied out of, and on top of that, you can't change the model setting for a relationship after it is created.

Don't use Eclipse. You simply need a text editor to edit the index.eomodeld files and either use Finder or Terminal to move the files around. You just need to make sure after making the changes, your models are accessible within the classpath if the models reside in different frameworks).


Assuming you have a model called "AllInOne EOModel" and you want to split it to "First EOModel", "Second EOModel" and "Third EOModel".

Step 1: Open your AllInOne EOModel in Finder and select all the *.plist files that you want to move to "First EOModel" and drag them to "First EOModel", Do the same for Second EOModel and Third EOModel.
Step 2: Copy the AllInOne EOModel's index.eomodeld file to First EOModel, Second EOModel and Third EOModel.
Step 3: Open the First EOModel's index.eomodeld file and delete the entries from the entities() section which do not belong to First EOModel. Do the same for Second EOModel and Third EOModel.
Step 4: Delete AllInOne EOModel from the project.


Open Eclipse, refresh the Resources Folder. Open First EOModel, Second EOModel and Third EOModel.

The model should be okay now.

All this requires careful movement and editing. Even if you get errors in Eclipse you'll understand that which entity you moved, defined in index.eomodeld but not available in the model.

Hope this helps.

Note: Don't use eclipse to move the Entities across the models.

Farrukh


Am I missing something or am I really going to have to redefine the cross-model relationships?


Thanks,

Dave _______________________________________________
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




_______________________________________________ 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

_______________________________________________
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


References: 
 >Splitting an EOModel (From: David Avendasora <email@hidden>)
 >Re: Splitting an EOModel (From: Farrukh Ijaz <email@hidden>)
 >Re: Splitting an EOModel (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: wildcard Query
  • Next by Date: Re: Scala and WebObjects
  • Previous by thread: Re: Splitting an EOModel
  • Next by thread: Re: Splitting an EOModel
  • Index(es):
    • Date
    • Thread