[ 
https://issues.apache.org/jira/browse/OPENJPA-2837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Enrico Olivelli updated OPENJPA-2837:
-------------------------------------
    Description: 
If you want to enable physical Foreign Keys you have to configure SchemaFactory 
with 'native'.

In this case the LazySchemaFactory does not handle correctly delimiters and 
everything breaks, even the creation of OPENJPA_SEQUENCE table.

 

The problem is that the query generated for loading the sequence value is:
{code:java}
SELECT `SEQUENCE_VALUE` FROM "herd"."`OPENJPA_SEQUENCE_TABLE`" WHERE `ID` = ? 
FOR UPDATE [params=?]{code}
 

It is adding default delimiters to the schema name and the tablename.

the problem is in TableJDBCSeq.java, using 

  was:
If you want to enable physical Foreign Keys you have to configure SchemaFactory 
with 'native'.

In this case the LazySchemaFactory does not handle correctly delimiters and 
everything breaks, even the creation of OPENJPA_SEQUENCE table.

 

The problem is that the query generated for loading the sequence value is:
{code:java}
SELECT `SEQUENCE_VALUE` FROM "herd"."`OPENJPA_SEQUENCE_TABLE`" WHERE `ID` = ? 
FOR UPDATE [params=?]{code}


> 'native' SchemaFactory (LazySchemaFactory) does not work with DBDictionaries 
> that require delimiters (like HerdDBDictionary) and generated column values
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2837
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2837
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 3.1.2
>            Reporter: Enrico Olivelli
>            Priority: Critical
>             Fix For: 3.1.3
>
>
> If you want to enable physical Foreign Keys you have to configure 
> SchemaFactory with 'native'.
> In this case the LazySchemaFactory does not handle correctly delimiters and 
> everything breaks, even the creation of OPENJPA_SEQUENCE table.
>  
> The problem is that the query generated for loading the sequence value is:
> {code:java}
> SELECT `SEQUENCE_VALUE` FROM "herd"."`OPENJPA_SEQUENCE_TABLE`" WHERE `ID` = ? 
> FOR UPDATE [params=?]{code}
>  
> It is adding default delimiters to the schema name and the tablename.
> the problem is in TableJDBCSeq.java, using 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to