Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > EOF Developer's Guide

Table of Contents Previous Section

How Do I Share Models Across Applications?

You should put shared models in a shared framework. Enterprise Objects Framework automatically looks for models in the frameworks used by your application (both at run-time, and at design time in EOModeler, Interface Builder, and WebObjects Builder). Also put the enterprise object classes that correspond to the model in the framework.

In order for Enterprise Objects Framework to find a model in a framework, that framework must be built and installed. During design, Enterprise Objects Framework looks at the model in the installed version of the framework (not in the source version of the framework project). This can result in Interface Builder and WebObjects Builder not seeing the changes in the source version of the model since it's looking at the version in the installed framework, rather than at the one in your source directory. You can tell Enterprise Objects Framework to look for models in the source version of your framework projects by using the following commands (executed in a shell):

defaults write NSGlobalDomain 
EOProjectSourceSearchPath"($(HOME)/myProjectsDirectory1, 
/myOtherProjectsDirectory)"
Then, when EOModeler, Interface Builder, or WebObjects Builder look for models contained in one of your frameworks, it first searches all project directories within $(HOME)/myProjectsDirectory1 and /myOtherProjectsDirectory before searching for the built versions.

Table of Contents Next Section