Ah yes, we don't rename entity names because those entities may lie
in other model files and saving will revert them back, potentially
leaving you with a big of a mess on your hands (though we COULD do
the rename in memory just enough to allow the model to load to try
and implement the last-model-loaded-wins-the-name approach that WO
runtime uses). Like Anjo mentioned, the PROPER fix for this is to
use Prototypes. I don't have a good answer for this otherwise ...
There are a huge number of weird complications that arise with
duplicate entity names that I have no idea how old EOModeler would
resolve either (i suspect sort of randomly). Just looking at the
parent entity pulldown -- what should be populated in that. In the
case where ALL of your duplicate entities are REPLACED by the model
you're looking at right now, this is less of an issue, but what about
if you have two duplicate models and one unique model and you open
the unique one. How the heck do I resolve the fact that there are
two models with duplicate entities that loaded in an effectively
random order?
ms
On Jul 31, 2006, at 7:45 AM, Mike Schrag wrote:
> How do you actually use these models at runtime without totally
> confusing your WO app? The rules of NSBundle are what we are based
> on, which is "load all the models we find," hence the explosion
> you're seeing (though I really expected it to rename duplicate
> entity names -- also not desirable for you, but I'll have to check
> on that one).
>
> ms
>
> On Jul 31, 2006, at 5:07 AM, Stéphan Mertz wrote:
>
>> Hi,
>>
>> I have in my project, different version of the same Model, one for
>> each database I use.
>> If I try to open a model, I have this exception:
>> org.eclipse.core.runtime.CoreException: Failed to load model in F/
>> JavaResUrgencesEO/models/ResUrgences_MySQL.eomodeld.
>> at
>> org.objectstyle.wolips.eomodeler.model.EclipseEOModelGroupFactory
>> $ModelVisitor.visit(EclipseEOModelGroupFactory.java:163)
>> [...]
>> org.eclipse.core.runtime.CoreException[0]:
>> org.objectstyle.wolips.eomodeler.model.DuplicateEntityNameException:
>> There is more than one entity named 'Acte' in this model group.
>> at
>> org.objectstyle.wolips.eomodeler.model.EOModel._checkForDuplicateEnti
>> tyName(EOModel.java:250)
>> at org.objectstyle.wolips.eomodeler.model.EOModel.addEntity
>> (EOModel.java:278)
>> [...]
>>
>> Is there a way to manage this type of configuration?
>>
>> Sincerely,
>>
>> Stéphan Mertz
>>
>
This archive was generated by hypermail 2.0.0 : Mon Jul 31 2006 - 07:59:48 EDT