Re: vertical inheritance
Re: vertical inheritance
- Subject: Re: vertical inheritance
- From: Lachlan Deck <email@hidden>
- Date: Tue, 22 May 2007 10:46:32 +1000
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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden