The way schema name defines within Kundera is keyspace@persistenceunit .For RDBMS support Kundera relies on Hibernate which will not work with such definition, so that's why we suggest to skip schema name or provide schema name only without "@" .
Hope it helps.
Sent: 30 May 2013 18:45
To:
kundera...@googlegroups.com
Subject: Re: {kundera-discuss} HIbernate configuration only sees persistence.xml properties and not Spring EntityManagerFactory configured properties
Thanks for an answer Vivek, but it really doesn't help me. Let me see if I understand correctly: My entities *must* have a schema name on the Table annotation to work with Kundera when persisting to Cassandra, but *cannot* have a schema name on the Table annotation when unit testing the same entities using an in-memory database and hibernate?
Thanks,
Nick.
On Wednesday, May 29, 2013 3:01:26 PM UTC-5, Vivek wrote:
Any entity, which is intended for RDBMS should be annotated with @Table annotation but no schema name as:
@Table(name = "PERSON", schema = "testdb")
public class PersonRDBMS
{
Here, table name is PERSON and testdb is schema name.
Hope this helps.
-Vivek
________________________________________
From:
kundera...@googlegroups.com [
kundera...@googlegroups.com] on behalf of Nick [
nick.the....@gmail.com]
Sent: 30 May 2013 01:28
To:
kundera...@googlegroups.com
Subject: Re: {kundera-discuss} HIbernate configuration only sees persistence.xml properties and not Spring EntityManagerFactory configured properties
Hi guys,
sorry if I'm a little unclear about the current state of this work. I have tried updating to kundera 2.5 and it gets a little further, so I am assuming that some work has been done on this.
My current state of play is that hibernate now gets beyond the configuration stage but the in-memory HSQL database that I am trying to use for my unit tests does not have any tables created before the persistence tests run. I tried to fix that by adding a new property, hibernate.hbm2ddl.auto set to a value of create. Unfortunately, hibernate fails to create the schema (which kundera insists upon having) and gives the following error:
2013-05-29 14:16:38,237 [main] DEBUG (SqlStatementLogger.java:104) org.hibernate.SQL -
create table Kunde...@kundera-test-persistence-unit.addresses (
id varchar(255) not null,
city varchar(255),
line1 varchar(255),
line2 varchar(255),
last_updated timestamp not null,
customer_id varchar(255),
primary key (id)
)
Hibernate:
create table Kunde...@kundera-test-persistence-unit.addresses (
id varchar(255) not null,
city varchar(255),
line1 varchar(255),
line2 varchar(255),
last_updated timestamp not null,
customer_id varchar(255),
primary key (id)
)
2013-05-29 14:16:38,237 [main] ERROR (SchemaExport.java:425) org.hibernate.tool.hbm2ddl.SchemaExport - HHH000389: Unsuccessful: create table Kunde...@kundera-test-persistence-unit.addresses (id varchar(255) not null, city varchar(255), line1 varchar(255), line2 varchar(255), last_updated timestamp not null, customer_id varchar(255), primary key (id))