[odb-users] Problem trying to use bidirectional relationships, composite ids, and lazy weak pointers

Vickie Webster vaw4 at case.edu
Fri Dec 5 17:01:25 EST 2014


Hello,

I am working on a project where I am trying to set up a bidirectional
relationship between two objects, one of which has a composite ID. I have
included the .hxx file and my driver file below. I am using Windows 7, msys
with 64 bit minGW (tdm64-gcc-4.8.1-3), and postgres ver 9.3.5 (64 bit). I
am using odb 2.3.0.

When I compile my .hxx file I am warned the "value type that is used as
object id in persistent class with session support does not define the less
than (<) comparison" and told to "provide operator< for this value type". I
have included screen shots of compile errors below for clarity. I then
wrote an operator< finction for this id type and the .hxx compiles. I then
get a warning when I try to compile the generated localobjects-odb.cxx file
that "void odb::lazy_ptr_base::reset_id() redeclared without dllimport
attribute after being referenced with dll linkage [enabled by default]",
however the file does compile.

Finally, when I try to run the driver I end up with the error "multiple
definition of 'operator<(routingID,routingID)'".

I have previously successfully written and run code to handle
unidirectional relationships and would greatly appreciate any help on this
matter. Please let me know if you need any other information.

Thank you,
Vickie Webster
Case Western Reserve University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Support Request.zip
Type: application/zip
Size: 87789 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20141205/9a67c779/SupportRequest-0001.zip


More information about the odb-users mailing list