Thread:
 FoxPro Connection works 
 antoschka   15 Jun 2008, 09:56 
 Re: FoxPro Connection works 
 antoschka   15 Jun 2008, 10:53 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: antoschka (15 Jun 2008, 09:56) Replies: 1, Views: 828
Subject: FoxPro Connection works
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" />.
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]