[odb-users] Generating Database Support Code

Boris Kolpackov boris at codesynthesis.com
Mon Dec 13 11:07:04 EST 2010

Hi Myoungkyu,

Myoungkyu Song <mksong at vt.edu> writes:

> However, I had gotten another error message like this;
> $ odb -I../../../x10_2.1.0/include/ -d mysql --generate-query
> SequenceModel.h
> SequenceModel.h:68:1: error: unable to map C++ type '::StringRef' used in
> data member 'x10__id' to a database type
> SequenceModel.h:68:1: info: use '#pragma db type' to specify the database
> type

You will need to tell the ODB compiler how to map 
x10aux::ref<x10::lang::String> to a suitable database type (e.g., 
TEXT, VARCHAR, etc). You will also need to provide the value_traits
specialization for this type. For more information on how to do all
this, see the 'mapping' example as well as Section 5.3.1, "type" in
the manual:



More information about the odb-users mailing list