How to set up Autoinc keys with ECO

Expand / Collapse
 
     

How to set up Autoinc keys with ECO


When storing objects in a database ECO will allocate unique IDs to each object. The default mechanism will allocated the IDs using a table called ECO_ID (surprise surprise). If you want to change to database generated IDs (AutoInc), follow these steps:
  • Open your PersistenceMapperProvider designer
  • Add a DefaultORMappingBuilder component on the designer
  • Rightclick it and select "Setup AutoIncKeys"
  • Select your PersistenceMapperXXX and set "RuntimeMappingProvider" and "NewMappingProvider" to the new component (defaultORMappingBuilder1)
This change is not supported by DbEvolve, so you will need to regenerate the database schema after this change. Any new table added by evolve after this change will have the correct column type, but old tables will not be updated.

Add Your Comments


Name: *
Email Address:
Web Address:
Verification Code:
*
 

Details
Last Modified:den 7 oktober 2008
Last Modified By: Jonas Högström
Type: HOWTO
Article not rated yet.
Article has been viewed 1 212 times.
Options