Fwd: Re[2]: [odb-users] odb compilation Visual Studio 2008 error

Александр Кожевников bioshocker at mail.ru
Sat May 11 05:26:24 EDT 2013


>I don'see what in that thread made you think that you need to add these
>options. You definitely don't need them.
>
>Your problem is that you are using an unsupported mapping between a C++
>type and a database type (e.g., mapping int to TEXT). Can you you show
>the fragment of code that this error points to as well as the 
>corresponding persistent class?
>
>Boris

I've got some supposses, what i had wrong mapped type in database, but don't think what this error showed up in compile-time.
I think, problems here:
 
#pragma db value
class TimeStamp
{
public:
TimeStamp( tm time);
const tm getCurrentTime();
private:
friend class odb::access;
#pragma db type("DATETIME")
tm time_;
};
}

and/or here 
 
#pragma db object
class ODBTrackerStamp
{
public:
ODBTrackerStamp( DeviceId deviceId, Coordinate coordinate, TimeStamp timeStamp);
const Coordinate& getCoordinate() const;
const db::TimeStamp& getTimeStamp() const;
private:
friend class odb::access;
#pragma db id
#pragma db type("NVARCHAR(36)")
boost::uuids::uuid deviceId_;
Coordinate coordinate_;
TimeStamp timeStamp_;
}; 


More information about the odb-users mailing list