Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OracleDB compatibility #52

Open
EricEttes opened this issue Oct 28, 2015 · 0 comments
Open

OracleDB compatibility #52

EricEttes opened this issue Oct 28, 2015 · 0 comments

Comments

@EricEttes
Copy link

When using the current version of Hibernate (4.2.2.Final) and JPA (Hibernate JPA 1.0.1.Final), the following issues arise:

current on Connector is a reserved keyword. Fixable by adding an @Column annotation with a different name

Table and column names should not exceed 30 characters. At the time of writing, this applies to the operator-api module:

  • io.motown.operatorapi.viewmodel.persistence.entities.ChargingStation.localAuthorizations will be generated into table ChargingStation_localAuthorizations
  • io.motown.operatorapi.viewmodel.persistence.entities.ChargingStation.configurationItems will be generated into table ChargingStation_configurationItems

Oracle does not support @GeneratedValue(strategy = GenerationType.IDENTITY) until Oracle 12c. For Oracle10g Dialect, use a @SequenceGenerator

example

@Id
@SequenceGenerator(name="seq", allocationSize=1, initialValue=1)
@GeneratedValue(generator="seq")
private Long id;

note
These issues arose with Oracle10g Dialect, configurable in the jpaVendorAdapter as such:

<property name="jpaVendorAdapter">
   <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
      <property name="databasePlatform" value="org.hibernate.dialect.Oracle10gDialect" />
      <property name="database" value="${hibernate.dialect}"/>
      <property name="generateDdl" value="true"/>
   </bean>
</property>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant