Re: ClassName checking

From: Andrus Adamchik (
Date: Tue Nov 19 2002 - 15:03:10 EST

  • Next message: Craig Miskell: "Re: ClassName checking"


    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.
    > Craig
    > 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.
    >> Andrus
    >> CayenneModeler Info
    >> Version: 1.0b1-dev
    >> Build Date: November 18 2002
    >> Exception:
    >> =================================
    >> java.lang.IllegalArgumentException:
    >> Cannot add ObjEntity UntitledObjEntity2 because this DataMap already has an
    >> ObjEntity (UntitledObjEntity1) for the class null
    >> at
    >> at
    >> org.objectstyle.cayenne.modeler.action.CreateObjEntityAction.createObjEntity(
    >> at
    >> org.objectstyle.cayenne.modeler.action.CreateObjEntityAction.performAction(
    >> at
    >> org.objectstyle.cayenne.modeler.action.CayenneAction.actionPerformed(
    >> at javax.swing.AbstractButton.fireActionPerformed(

    This archive was generated by hypermail 2.0.0 : Tue Nov 19 2002 - 15:03:19 EST