[Teneo] Identifier for my objects [message #607030] |
Thu, 21 June 2007 09:43 |
Gonzalo Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Hi Martin!
I've designed my model using EMF, and then generated my hibernate.hbm.xml
mapping file using Teneo. This is for a web application.
Here is an excerpt:
<!-- Generated by Teneo on Mon May 07 19:41:00 CEST 2007 -->
<hibernate-mapping>
<class entity-name="Factura" abstract="false" lazy="false"
discriminator-value="Factura" table="`factura`">
<meta attribute="eclassName">Factura</meta>
<meta attribute="epackage">http://productoexpediente.factura</meta>
<id type="long" name="e_id" column="e_id"
access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropertyHandler ">
So Teneo creates an id called "e_id", but I haven't any id in my classes.
My question is: Must all my objects extend a class (for example:
"AbstractObject") with an attribute "id"?
If I execute the method findAll() in the DAO, How can I retrieve the
attributes of a particular instance returned by findAll()? I suppose I need
the id of that instance, so how can I get that id to retrieve the other
attributes?
Thank you again!
With regards,
Gonzalo
|
|
|
Powered by
FUDForum. Page generated in 0.01692 seconds