|
|
|
|
Re: Texo: how to annotate all tables: prefix for tables in db [message #871590 is a reply to message #871571] |
Mon, 14 May 2012 13:35 |
Olaf Burdziakowski Messages: 46 Registered: April 2012 |
Member |
|
|
Hi Martin,
it helped, thank you. Now I have:
@Entity(name = "FileType")
@Table(name = "ABCFileType")
public class FileType
But I wanted prefix due to another schema with the same element: FileType.
So to really have different Entity name (Hibernate complains about duplicates) I had to define an extra annotation for my class:
<ePackage href="config_dir.ecore#/"/>
<ePackageAnnotations xsi:type="ormannotations:EPackageORMAnnotation" generateFullDbSchemaNames="true" nameDictionaryPropertyFile="" tableNamePrefix="ABC"/>
<ePackageAnnotations xsi:type="modelannotations:EPackageModelGenAnnotation" javaFileHeader="" rootClassExtends="model.identifiable.Identifiable"/>
<annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
<eClass href="config_dir.ecore#//FileType"/>
<eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
<entity class="" name="ABCFileType"/>
</eClassAnnotations>
</annotatedEClassifiers>
Now I have what I wanted:
@Entity(name = "ABCFileType")
@Table(name = "ABCFileType")
public class FileType
Is this designed solution? Can I have the same result with some common assignment?
I would like to get this for all classes in my package:
@Entity(name = "ABCFileType")
public class FileType
[Updated on: Mon, 14 May 2012 13:36] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04096 seconds