Skip to main content


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
Hi,

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

For this i try to do:

add:
<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"
xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<property name="SQL_TABLE_NAME_PREFIX" value="TBL_"></property>
</entity-mappings>

but nothing ocurrs, what is the way for this?

thankss

thanks.

[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: 1389
Registered: July 2009
Senior Member
Hello,

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,
Chris

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

Report message to a moderator

Previous Topic:Getting Results and Count from NamedQuery
Next Topic:add column in a table
Goto Forum:
  


Current Time: Fri Apr 26 22:25:25 GMT 2024

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

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

Back to the top