| Referencing Ecore to Support ORM [message #656623] |
Sun, 27 February 2011 11:23  |
Glenview Jeff Messages: 79 Registered: September 2010 |
Member |
|
|
I am trying to add support to my existing meta-model for modeling an Object Relational Mapper (ORM.) I came across this very old post in the newsgroups, and first was wondering (Ed Merks) if the tutorial was ever written?
Specifically, what I'd like my meta-model to ultimately support is the creation of models that look something like this:
PersistentClass:
myName : "TestClass"
myTableName: "TestClass"
myOrmAttributes:
OrmBoolean: (Ideally extending the Ecore EBoolean, but I have read this is a bad idea.)
myName: "TestOrmBoolean"
myStoredType: "boolean"
EBoolean: (Ideally referencing the Ecore type)
Name: "TestEcoreBoolean"
...
and the meta-model would look something like this:
PersistentClass:
myName : EString
myTableName: EString
myOrmAttributes: [0..*] OrmAttribute
myEcoreAttributes: [0..*] EAttribute (I have to separate this from myOrmAttributes because I shouldn't extend Ecore, right?)
OrmAttribute:
myStoredType: EString
OrmBooleanAttribute: Extends OrmAttribute
myAttribute: EBoolean
OrmStringAttribute: Extends OrmAttribute
myAttribute: EString
...
This looks quite ugly because of being discouraged from extending ecore. Is there a better way to accomplish what I'm trying to do?
Thanks!
Jeff
[Updated on: Sun, 27 February 2011 13:05] Report message to a moderator
|
|
|