- This topic has 5 replies, 3 voices, and was last updated 14 years, 1 month ago by
jkennedy.
-
AuthorPosts
-
rdennisjMemberI want to extend the code generator, to implement table columns defined with a foreign key, as a drop-down box with choices populated from the foreign key table. But I don’t know how to read the ecore model to get foreign key data from the ‘relationships’ segment of the model. I have gone thru EMF tutorials, where an ecore model is being generated (as an example), but the XML element and attribure names don’t match up to the properties you reference in your .jet files.
Is there some way we can see what you generate into an ecore model, so we can see what kinds of metadata is available to us during code generation?Thanks! And keep up the good work!
davemeurerMemberHello,
One way you can see the eCore models is if you Enable the Spring DSL, and then look in the folder structure under the .springDSL folder. For more about Enabling the Spring DSL, please see the tutorial: http://www.myeclipseide.com/documentation/quickstarts/ME4STutorialInitialization/me4sinitializationarticle.html
Regarding relationships, a good example in our JET templates in the customization project can be found in the GWT templates that handle creating Pickers which are used to create associations to related objects.
HTH,
Dave
rdennisjMemberDave,
Thanks so much for the response. I did have the Spring DSL enabled (per an earlier post where you recommended this). I notice artifacts are created under .springDSL, in subfolders dao, domain, and service. If I have a domain file called ‘item’, I see there are files in the domain subfolder, named:
item.datatype
item.datatypebinding
item.gwtdatatype
item.jaxbdatatypeWhich of these files is used as the model source when the FLEX client generation is executed?
davemeurerMemberHello,
The main model used in Flex is item.datatype.
item.datatypebinding is the model that holds information for JPA related information and persisting to the database.
item.gwtdatatype as you would expect is a model for GWT.
and, item.jaxbdatatype is used to hold the XML annotation information on the domain object.
Kind regards,
Dave
rdennisjMemberAwesome, thanks!
jkennedyMemberLet me know if you need anything else.
Thanks,
Jack -
AuthorPosts