Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink JPA2.0 orm table name prefix help(Choose a table name prefix with eclipselink an jpa 2.0)
EclipseLink JPA2.0 orm table name prefix help [message #630158] Thu, 30 September 2010 20:03 Go to next message
miguel is currently offline miguelFriend
Messages: 4
Registered: September 2010
Junior Member

I need to choose a name prefix for my data base tables, with JPA2 and eclipselink.

For this i try to do:

<mapping-file>META-INF/orm.xml</mapping-file> to my persistence.xml

and create: orm.xml in the configuration folder with the code:

<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings version="2.0"
<property name="SQL_TABLE_NAME_PREFIX" value="TBL_"></property>

but nothing ocurrs, what is the way for this?



[Updated on: Thu, 30 September 2010 20:03]

Report message to a moderator

Re: EclipseLink JPA2.0 orm table name prefix help [message #630308 is a reply to message #630158] Fri, 01 October 2010 14:19 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1284
Registered: July 2009
Senior Member

Looks like SQL_TABLE_NAME_PREFIX is a teneo property, or atleast a static string in the org.eclipse.emf.teneo.PersistenceOptions class, not a JPA/Eclipselink property. The Teneo property it refers to is "teneo.mapping.sql_table_name_prefix", and there is no JPA or EclipseLink equivalent. The only way to add a prefix to tables in JPA is to define each table with the prefix. In EclipseLink, you can use a customizer to accesses and modify the tables, but requires advanced native api and internal digging to get at each individual table.

Please file an enhancement to have such a feature implemented in EclipseLink.

Best Regards,

[Updated on: Fri, 01 October 2010 14:20]

Report message to a moderator

Previous Topic:columnDefinition="RAW()" x hextoraw
Next Topic:MOXy/JAXB ClassCastException: attempting to cast bundleresource://.../JAXBContext.class to jar:file:
Goto Forum:

Current Time: Thu Feb 22 13:36:11 GMT 2018

Powered by FUDForum. Page generated in 0.01950 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software