Jump to content

WebObjects/EOF/Modeling/EOModeler Bugs

From Wikibooks, open books for an open world
  • How can a property editor be so buggy?
  • This distracts from the power of WebObjects

---

What kind of bugs are you experiencing? Could you be specific?

The first impression of EOModeler is that we could do a lot with it and it usually does at first. The problems start when the model becomes more complex.

  • Model editing bugs
    • If you are using inheritance, and most real life application do, EOModeler exhibits some very strange behavior.
    • If you copy and paste an Attribute that is defined by a prototype it will some times not copy it or copy partial information in the children especially if you have overwritten some of the attribute of the prototype. (It loses the primary key everytime)
    • Copy and paste of relationship in parent entities is not reflected in the children.
    • With some deep inheritance turning the attribute bit on or off is not always propagated to the children.
  • Project Builder integration
    • When you generate a new java file it brings a dialog box asking for insertion in the project but answering OK does nothing.

The merge feature is somewhat nice but we need a more robust mechanism for separating generated code and custom one.

  • Run time bugs
    • The one that I know about and still bites me regularly, although fortunately not too often, is the internalInfo one. EOModeler inserts in the model file some properties that are not used at run time. Sometimes these properties will cause a crash i.e. in a prototype entity or on relationship.

---

Newbie says:

I'm seeing a bug when trying to syncronize the EOModeler file with my mySQL database. I suspect that it's a problem with the adaptor, but I'm not sure. It's giving me an alert box: "ALERT : no reason provided". How does one debug the adaptor's operation? I couldn't find any information about this bug, searching omni nor apple.

I'm not sure that feature has ever worked since v5 need to synchronize manually.


The "ALERT : no reason provided" bug may be because your database has tables that consist only of primary keys (e.g., tables used to create many-to-many relationships). EOF's reverse engineering code chokes when it encounters a table that will have no class properties.

Another bug. I submitted this one to Apples Bugreporter

In WebObjects EOModeler I try to setup a many-to-many relationship as described in the EOModeler documentation. This leads to a problem, where I can't generate SQL Statements from my entities. There is an error message displayed that says "*** -[NSCFDictionary? setObject:forKey:]: attempt to insert nil value"

  • STEPS TO REPRODUCE
  1. Open EOModeler
  2. Setup new model as described in WebApplications? documentation (look into http://developer.apple.com/documentation/WebObjects/Web_Applications/EnterpriseObjectsApp/chapter_11_section_3.html#//apple_ref/doc/uid/TP30000121/BAJEFFEH)
  3. Generate a second entity Book in the same way as described above. Let it have just one attribute "title" and a primary key "bookID"?;. Same properties as the entity "Author"
  4. Try to setup a many-to-many relationship as described in "Using EOModeler"?; documentation (look into http://developer.apple.com/documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/chapter_5_section_7.html#//apple_ref/doc/uid/DontLinkBookID_504-DontLinkChapterID_4-BABGHHGG)
  5. Switch to diagram view
  6. Select both entities
  7. Select "Join in many-to-many" from "Property" menu
  8. Give the newly created entity a tablename (f.e. "AUTHOR_BOOK"?;)
  9. Check Consistency from the Model menu (all well)
  10. Try to generate SQL commands for the creation of the tables for your model by selecting the first entity "Author" and then "Generate SQL..."?; from the "Property" menu.
  11. Boom! Error message.
  • RESULTS

I expected the command to flawlessly function and generate SQL statements so that I can create my tables and use my model.

  • REGRESSION

Tried different project setups, isolated to minimal count of tables possible. Reread documentation. No solution.