Hey Angelo,
As far as your statement:
1) I prefer to implement my business logic in my custom classes rather than in SQL code that will often be hard to maintain and that will almost certainly be tailored for a specific RDBMS. Anyway, what is the point in having custom classes and the power of Enterprise Objects if I must rely on custom-tailored SQL code?
Amen, brother! You are 100% right. If you are not forced into working with a legacy database, you should **not** be doing a bunch of work-around, hacky BS with derived attributes/relationships or read/write formatters. Store the data in the DB how you want to use it. Why have an ORM if you are still forced to write SQL? And even if you are forced to use an existing column, there are ways to do what you want using Java instead. See the “boolean” erprototype. It is an example of using a “Custom" Data Type in Entity Modeler which you can use specify your own Java class to do the read/write transformations instead of writing db-specific SQL.
As far as the rest of the issues you describe, there is something very wrong. The things you describe in point 2 and 3 below should not be happening.
How have you modeled these three entities? (Party, Person, Organization)
What type of Inheritance are you using? (SingleTable, Vertical, Horizontal)
How are the entities represented in the database? (one table, two tables, three tables)
With EOF the EOModel is EVERYTHING. If you don’t get it right, you will be writing a huge amount of code to try to make EOF do what you really want and it will likely still not do it every time.
If you get the EOModel right, then the code will seem to write itself and all this work you are doing will just go away.
I’m going to be in-and-out all day today, but if you can zip and attach your .eomodeld file, I’ll look it over to see if I (or anybody else) can spot where things have gone wrong for you.