Apache Cayenne > Index > Cayenne FAQ > DbAttribute Type
Added by Andrus Adamchik, last edited by Andrus Adamchik on Mar 01, 2005

DbAttributes can be mapped to data types defined in JDBC standard. So your mapping is always database independent. Underlying JDBC driver should do the necessary conversion between JDBC and DB type system.

The only time when you might care about DB-specific types is during DB schema generation from CayenneModeler (so it doesn't affect runtime at all). JDBC to native type mapping is done by DbAdapter. Each DbAdapter package included in cayenne.jar contains a file called "types.xml". That's the default mapping. Eventually Modeler will provide a way to edit it. Right now if you want a different mapping, you'll have to unpack cayenne.jar, edit types.xml and package it again (or play with Modeler startup CLASSPATH to make sure your custom types.xml is used before the one from cayenne.jar).