I've managed to connect to FoxPro databases. Even in a complex data
model there I could not encounter any problems. As Dialect I took a
GeneralDialect or MsSql2000Dialect - the Driver I defined as OleDbDriver.
The biggest hurdle was to find out the appropriate generator class for
the various Id-columns of the entities.
Never set autoincrement on the database level. This will not work with
foxpro. Define it as Id or leave the id column as normal column. The
important think is to define the Id Column in entity Mapping file with
<generator class="increment" />
example:
<id name="IdentityEntity" column="IdentityColumn" type="int">
<generator class="increment" />
</id>
If you want to assign the ids yourself use <generator class="assigned" />. |