since "addObjEntity" is mainly used by the modeler, shouldn't we remove all
the checks at all, and rather move them to the validation package?
I think we should allow saving multiple entities with the same class name
(even if it is not null), just give a validation warning. When working on
the Modeler I discovered that any tight data structures make the tool very
unfriendly, since they don't allow saving partial work.
Let me know if you need help on doing validation.
Craig Miskell writes:
> Done. DataMap and DataDomain now allow multiple ObjEntities with a null
> class name.
> On Tue, 2002-11-19 at 17:23, Andrus wrote:
>> Maybe we are being too strict with the new class vs. entity name policies?
>> For instance it is normal for CayenneModeler to have 2 ObjEntities with
>> null class name during the editing. The only thing that must be unique for
>> the modeler to work is "ObjectEntity name". Right now an attempt to create
>> 2 ObjEntities with different names but null class would give an exception
>> shown below. I will file a bug report for this, but basically all we need
>> is to remove extra strict checking for class name uniquness.
>> CayenneModeler Info
>> Version: 1.0b1-dev
>> Build Date: November 18 2002
>> java.lang.IllegalArgumentException: org.objectstyle.cayenne.map.DataMap:
>> Cannot add ObjEntity UntitledObjEntity2 because this DataMap already has an
>> ObjEntity (UntitledObjEntity1) for the class null
>> at org.objectstyle.cayenne.map.DataMap.addObjEntity(DataMap.java:249)
>> at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
This archive was generated by hypermail 2.0.0 : Tue Nov 19 2002 - 15:03:19 EST