I've turned on EOAdaptorDebugEnabled...

[2007-05-22 11:26:02 EST] <WorkerThread12> === Begin Internal Transaction [2007-05-22 11:26:02 EST] <WorkerThread12> finding primary key value for Person [2007-05-22 11:26:02 EST] <WorkerThread12> evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT PK FROM EO_PK_TABLE WHERE NAME = 'Person' FOR UPDATE">
[2007-05-22 11:26:02 EST] <WorkerThread12> fetch canceled
[2007-05-22 11:26:02 EST] <WorkerThread12> 1 row(s) processed
[2007-05-22 11:26:02 EST] <WorkerThread12> updating primary key value for Person [2007-05-22 11:26:02 EST] <WorkerThread12> evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "UPDATE EO_PK_TABLE SET PK = 14 WHERE NAME = 'Person' AND PK = 13"> [2007-05-22 11:26:02 EST] <WorkerThread12> === Commit Internal Transaction [2007-05-22 11:26:02 EST] <WorkerThread12> === Begin Internal Transaction [2007-05-22 11:26:02 EST] <WorkerThread12> evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "INSERT INTO Person(id, lastName, code, created, modified, firstName, entityType) VALUES (?, ?, ?, ?, ?, ?, ?)" withBindings: 1:14(NeededByEOF0), 2:"SaveMe"(lastName), 3:2(code), 4:2007-05-22 00:00:00(created), 5:2007-05-22 00:00:00(modified), 6:"Please"(firstName), 7:"Employee"(entityType)> [2007-05-22 11:26:02 EST] <WorkerThread12> === Rollback Internal Transaction

The message on screen says:
Could not save your changes:
Object value '2' for column 3 is not an instanceof String

Any ideas?

On 22/05/2007, at 10:46 AM, Lachlan Deck wrote:

On 22/05/2007, at 6:26 AM, Mike Schrag wrote:

Since you're currently the leading contender for the 2007 Vertical Inheritance Award, you mind setting up a test scenario of this and let me know if it works as expected?

Basic model:
Company[1] <-->> Person (Abstract) [2], Employee [3] <<--> Country [4]

Running in a D2W app...
I created a Company and a Country and then when trying to create an Employee with relationship to both the company and country:

"Could not save your changes: Object value '1' for column 3 is not an instanceof String"

Adjusting the relationships to be not flattened:
java.lang.IllegalArgumentException: unable to add join {sourceAttribute = ; destinationAttribute = ; } to relationship _eofInv_Employee_company in entity Company because either the source attribute or destination attribute is a flattened attribute.

Hmm, Creating with EOModeler:
"Could not save your changes: Object value '2' for column 3 is not an instanceof String."

Attempting to not flatten the relationship, gives the above exception (about either a source/destination attribute being flattened).

I've attempted
- to not include the foreign key at all in the child (this fails when attempting to set the relationship because the companyId is missing) - to point the child relations source attribute to parent.foreignKey (this fails when attempting to login with an EORelation join error) - to flatten both the parent foreign key and relationship into child (this fails as for some reason it's attempting to set a String value) - to not include in the plist the relation or foreign key from parent (fails - to not include the relationship in the child (leaving the flattened fk) this doesn't provide an option to set the relation in D2W :-/

None work.

Does *anyone* know what does? I'm happy to supply the project/model files. If anyone is able to figure this out it would be greatly appreciated!

Note the relationship in the parent is a mandatory toOne to Company.

ps. Alan you mentioned that you guys 'do this' - can you offer any help here?

Thanks...

with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to