I have been working on a really simple test application to explore Fluent
HNibernate and am having a lot of success but when I try to switch my config
from one for SQLite to one for MySQL then:
_configuration.GenerateDropSchemaScript(_sessionFactory.Dialect) and
_configuration.GenerateSchemaCreationScript(_sessionFactory.Dialect)
Creates drop/create statements which throw SQL errors. The SQL seems to be
in MsSQL format (e.g. drop table if exists [Customer] rather than drop table
if exists Customer) and I can't see why that would be. I have checked the
value for _sessionFactory.Dialect in the code above and it is
NHibernate.Dialect.MySQLDialect
My config file is
<session-factory>
<property
name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.MySQLDialect</property>
<property
name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
<property name="connection.connection_string">Data
Source=localhost;database=Test;UID=user1;pwd=password1;</property>
<property name="connection.release_mode">on_close</property>
<property name="show_sql">true</property>
</session-factory>
Although the DB create/drop scripts are incorrect, if I create a DB by hand
then object persistance and retrieval all seem fine.
Does anyone have any idea why this might happen?
Thanks in advance
Neil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---