jhek
jhek

Reputation: 153

Do native queries use naming strategy to resolve the table name in the "from" clause of the given SQL query?

I have a custom naming strategy where I add a prefix to the table names. My question is: when I create a native query (using EntityManager.createNativeQuery) should I use the prefixed name of my tables in the FROM clause of my queries or should I use the non-prefixed name (as in JPQL queries) ??

Upvotes: 0

Views: 1573

Answers (1)

DataNucleus
DataNucleus

Reputation: 15577

A Native query is an SQL query, so you input what would execute in your datastore if you put it directly through JDBC. It is nothing to do with the Entities

Upvotes: 1

Related Questions