Alfonso,
I have a problem while inserting a new element into the DB.
I am using Sequoia controller (2.10.1). The application works fine
just using Hibernate - MySql. But when I use C-JDBC there is a problem
while getting the next sequence value.
I have also created this class as is said in the tutorial for
Postgres, but the error persists.
import org.hibernate.dialect.MySQLDialect;
public class SEQUOIAMySQLDialect extends MySQLDialect {
public String getSequenceNextValString(String sequenceName){
return "{call nextval('"+sequenceName+"')}";
}
}
This will not work with MySQL, this is specific to PostgreSQL. You
should use the standard Hibernate MySQL dialect with Sequoia.
However, you must enable persistent connection in order for Hibernate to
properly generate ids. This is done by adding ?persistentConnection=true
to your Sequoia JDBC URL. Example:
jdbc:sequoia://controller1,controller2/mydb?persistentConnection=true
You can find a description of all drivers option in the documentation at
http://sequoia.continuent.org/doc/infocenter/topic/org.continuent.sequoia.doc/html/Sequoia_URL_options.html#95683056_pgfId-999057
Thanks for your feedback,
Emmanuel
--
Emmanuel Cecchet
Chief Architect, Continuent
Blog: http://emanux.blogspot.com/
Open source: http://www.continuent.org
Corporate: http://www.continuent.com
Skype: emmanuel_cecchet
Cell: +33 687 342 685
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia