Re: EOModeler vs EntityModeler

From: Mike Schrag (mschra..dimension.com)
Date: Tue Sep 19 2006 - 07:22:02 EDT

  • Next message: Philippe Lafoucrière: "Re: EOModeler vs EntityModeler"

    > However when I try to generate SQL I get a nice small alert box
    > with just the message that a java. lang. NullpointerException had
    > occurred. Nothing in any log that I could find.
    Do you have a sample model that demonstrates this exception? It's
    really hard to diagnose an error report like this otherwise.

    > Well, that's bad but not a show stopper, I still have EOModeler.
    > But EOModeler is not happy with my model file!! Some external type
    > columns are empty, the model is corrupt and I have to fix it manually.
    A before-and-after model along with the list of the changes that were
    made in the UI would be very useful in this case. Do you use
    prototypes? Project Wonder prototypes? That would be the most
    likely explanation for external type columns being removed (i.e. if
    your prototype defines them and EOM), if I had to take a guess. But
    I would need to see the model to know what's actually going on.

    > OK, can do that but then why should I go with EntityModeler at all?
    Well, of course, the answer is that you don't have to ... But give us
    a little bit of a break here -- EntityModeler is just a few months
    old, EOModeler had 10 years, and there's near zero documentation on
    the internals.

    > What bothers me is that EOModeler and EntityModeler show different
    > Java classes and data types. One such case: EOM shows NSTimestamp/
    > DATETIME/(no value type) whereas the same is shown in EntityModeler
    > as (popup)Date(Object)NSCalendarDate/DATETIME. This is just one
    > case, I have observed other such disagreements.
    from decompiled EOF:
    if(name.equals("NSCalendarDate"))
            return "com.webobjects.foundation.NSTimestamp";
    NSCalendarDate and NSTimestamp are equivalent.

    What you're seeing on the data type side is that in EOModeler doesn't
    present to you the full list of data types (see file:///Developer/ADC%
    20Reference%20Library/documentation/WebObjects/UsingEOModeler/
    4WorkingWithAttributes/chapter_4_section_3.html#//apple_ref/doc/uid/
    TP30001018-CH204-BABFGECE ). "Date (Object)" is the name we give to
    NSTimestamp/NSCalendarDate with no value type:

            public static final EODataType STRING = new EODataType("NSString",
    new String[] { null, "" }, Messages.getString("EODataType.string"));
            public static final EODataType STRING_SET = new EODataType
    ("NSString", "S", Messages.getString("EODataType.stringSetString"));
            public static final EODataType STRING_CHAR = new EODataType
    ("NSString", "C", Messages.getString("EODataType.stringChar"));
            public static final EODataType STRING_UTF = new EODataType
    ("NSString", "E", Messages.getString("EODataType.stringUTF"));
            public static final EODataType STRING_RTRIM = new EODataType
    ("NSString", "c", Messages.getString("EODataType.stringRTRIM"));
            public static final EODataType BYTE = new EODataType("NSNumber",
    "b", Messages.getString("EODataType.byte"));
            public static final EODataType SHORT = new EODataType("NSNumber",
    "s", Messages.getString("EODataType.short"));
            public static final EODataType INTEGER = new EODataType("NSNumber",
    new String[] { "i", null, "" }, Messages.getString
    ("EODataType.integer")); //$NON-NLS-4$
            public static final EODataType LONG = new EODataType("NSNumber",
    "l", Messages.getString("EODataType.long"));
            public static final EODataType FLOAT = new EODataType("NSNumber",
    "f", Messages.getString("EODataType.float"));
            public static final EODataType DOUBLE = new EODataType("NSNumber",
    "d", Messages.getString("EODataType.double"));
            public static final EODataType BOOLEAN = new EODataType("NSNumber",
    "c", Messages.getString("EODataType.boolean"));
            public static final EODataType BIGDECIMAL = new EODataType
    ("NSNumber", "B", Messages.getString("EODataType.bigDecimal"));
            public static final EODataType DECIMAL_NUMBER = new EODataType
    ("NSDecimalNumber", (String) null, Messages.getString
    ("EODataType.decimalNumber"));
            public static final EODataType DATE_OBJ = new EODataType
    ("NSCalendarDate", new String[] { null, "" }, Messages.getString
    ("EODataType.dateObj"));
            public static final EODataType DATE = new EODataType
    ("NSCalendarDate", "D", Messages.getString("EODataType.date"));
            public static final EODataType TIME = new EODataType
    ("NSCalendarDate", "t", Messages.getString("EODataType.time"));
            public static final EODataType TIMESTAMP = new EODataType
    ("NSCalendarDate", "T", Messages.getString("EODataType.timestamp"));
            public static final EODataType DATE_MSSQL = new EODataType
    ("NSCalendarDate", "M", Messages.getString("EODataType.dateMSSQL"));
            public static final EODataType DATA = new EODataType("NSData",
    (String) null, Messages.getString("EODataType.data"));
            public static final EODataType CUSTOM = new EODataType(null,
    (String) null, Messages.getString("EODataType.custom"));

    > What am I doing wrong? Or is there a problem with EntityModeler?
    EM generating a model that EOM can't reopen is definitely a bug. We
    should never do that. I would need more details to know what is
    actually going on, though.

    ms



    This archive was generated by hypermail 2.0.0 : Tue Sep 19 2006 - 07:22:10 EDT