Does Eclipse Link work together with Vertica
-
30-01-2021 - |
Domanda
i'm currently testing vertica. Since vertica has a jdbc driver it should be possible to get it working.
Is there a simple way to get Eclipse link to support vertica? Are there alternative orm framework (like hibernate) that support it?
Soluzione 2
According to the Vertica Support Hibernate queries works with the org.hibernate.dialect.PostgreSQLDialect
while this is true there are still some problems (exspecially with hbm2ddl) that can only be fixed with a custom dialect.
Among those are:
- data type mapping: there are no 4 byte datatypes, so the default java int mapping to int4 doesn't work. same goes for several other types.
- no indexes: for obvious reasons vertica doesn't know create index, if your model contains @index annotations, remove them
not sure how far postgres is from vertica but with my own custom dialect that inherits the postgres dialect everything works so far.
Altri suggerimenti
As long as you have a compliant JDBC driver EclipseLink should work with Vertica.
Some features such as DDL generation, may require a custom DatabasePlatform class, which you could create if required. Most features should work with the generic DatabasePlatform.
Are you encountering any specific issues?
We recently tried to get Hibernate working with vertica unsuccessfully. One of the problems was an inexistent dialect for that combination. After consulting a Vertica consultant the answer was that there is no plans to provide this sort of support as ORMs like hibernate and a DB like Vertica provide different approaches for data storage.