2009-04-27

Using a GUID as the key in ECO

  1. Drop a DefaultORMappingBuilder component next to your persistence mapper.
  2. Point PersistenceMapperxxxxx1.NewMappingProvider and RuntimeMappingProvider to point to this new component.
  3. On your PersistenceMapper component expand SqlDatabaseConfig and click the [...] next to KeyMappers, ensure that you have an item named "GuidMapper" with the MapperTypeName set to "Eco.Persistence.GuidKeyMapper". If not then add it.
  4. On your DefaultORMapperBuilder set IdKeySignature to System.Guid (case sensitive).
  5. Set its IdMapperName to GuidMapper.

Now regenerate your DB.

No comments: