The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

MySQL Specific Recommendations

Last post 01-27-2007, 2:24 AM by ESAdmin. 0 replies.
Sort Posts: Previous Next
  •  01-27-2007, 2:24 AM 11

    MySQL Specific Recommendations

    Some MySQL specific recommendations:

    1) MyGeneration 1.2.0.7 contains the required Language mappings, but you will need to copy MySql.Data.dll into the MyGeneration Program folder. EntitySpaces versions older than 1.5.2 have some additional one-time MyGeneration setup instructions for MySQL at the bottom of the Release Notes for that release found under the Support Menu.

    EDIT - 2008-01-03: MyGeneration 1.3.0.3 includes MySql.Data.dll. It is not necessary to copy it.
    EDIT - 2008-03-10: MyGeneration 1.3.0.3 has some issues with MySQL foreign keys and stored procedures. We recommend MyGeneration 1.2.0.7 for MySQL users.

    2) The InnoDB table type supports transactions and foreign keys. MyISAM does not.

    http://dev.mysql.com/doc/refman/5.1/en/storage-engine-choosing.html

    3) Sample app.config:

    Code:
    <configuration> 
     <configSections> 
      <sectionGroup name="EntitySpaces"
       type="EntitySpaces.Interfaces.esConfigSettings, EntitySpaces.Core" > 
        <section name="connectionInfo" 
         type="EntitySpaces.Interfaces.esConfigSettings, EntitySpaces.Interfaces" 
          allowLocation="true" allowDefinition="Everywhere"
          restartOnExternalChanges="true" /> 
      </sectionGroup> 
     </configSections>  
      
     <EntitySpaces> 
      <connectionInfo default="MySQLDynamicTest"> 
       <connections> 
        <add name="MySQLDynamicTest" 
           providerMetadataKey="esDefault" 
           sqlAccessType="DynamicSQL" 
           provider="EntitySpaces.MySqlClientProvider" 
           providerClass="DataProvider" 
           connectionString="Database=foreignkeytest;Data Source=localhost; 
             User Id=TestUser;Password=TestUser;" 
        /> 
       </connections> 
      </connectionInfo> 
     </EntitySpaces> 
    </configuration>

    4) MySQL Connector/NET has an option to Allow Zero Datetime. .NET does not support zero datetime, so do not set it to true. If you have a default value in your TABLE CREATE, it should look like the following:
    `SomeDate` date NOT NULL default '0001-01-01'

     5) EntitySpaces 1.5.3 and earlier require MySQL Connector/NET 1.0.7. It has a bug for unsigned data types. Use the equivalent signed version, instead.

    http://bugs.mysql.com/bug.php?id=16788
    MySql.Data.MySqlClient.MySqlException was unhandled by user code
    Message="Only byte arrays and strings can be serialized by MySqlBinary"

    EntitySpaces 2007 and later require MySQL Connector/NET 5.0.3 or higher. It is the MySQL recommended Connector for ADO.NET 2.0. The unsigned data type bug is fixed.

    See this post on how to deal with minor version changes in the connector available from MySQL

    EDIT: As of EntitySpaces release v0.0730, our MySQL provider is bound to Connector 5.0.7.

    6) There is no boolean data type, use TINYINT(1).

View as RSS news feed in XML