Ah, you are right it seems that reusing AvailableSettings.HBM2DDL_AUTO will trigger
SchemaExport and that's not what we want. Go ahead with a specific property
hibernate.ogm.generate_schema
or something like that.
On 25 mars 2012, at 13:11, kmx.petals(a)gmail.com wrote:
Hi,
I am trying to integrate Cassandra into Hibernate OGM (cf. issue
OGM-122) and I have some noob questions.
To use Cassandra, it is mandatory to indicate the keyspace to use and to
switch into the right one.
As the keyspace is determining the application architecture and as it is
difficult to know how the application has to use the keyspace, we
decided with Emmanuel that it could be a good solution to distinct the
development mode where the keyspace & co would be created and the
production mode where Hibernate OGM would use an already existing keyspace.
We thought that it could be a good idea using the property
hibernate.hbm2ddl.auto which is well known by hibernate users.
However, setting this property to create or create-drop seems to
indicate to Hibernate core to create tables with the jdbc dialect.
If I am right, using the value create for the key hibernate.hbm2ddl.auto
indicates to the class SchemaExport to use JdbcDialect which is not what
is expected :
this.importFiles = ConfigurationHelper.getString(
AvailableSettings.HBM2DDL_IMPORT_FILES,
configuration.getProperties(),
DEFAULT_IMPORT_FILE
);
final Dialect dialect = serviceRegistry.getService( JdbcServices.class
).getDialect();
So, I suggest to use a different key to indicate if the development or
production mode should be used.
What do you think about?
Cheers,
Khanh Tuong
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev