[odb-users] Create a foreign key constrain to a unique column of other table

Vassilios Kountouriotis b.kountouriotis at gmail.com
Tue Sep 12 13:15:14 EDT 2017


On Sep 12, 2017 18:47, "Boris Kolpackov" <boris at codesynthesis.com> wrote:

Vassilios Kountouriotis <b.kountouriotis at gmail.com> writes:

> Furthermore, if this helps a bit, I'm really not interested in
> maintaining the loading capability from Log to the Ticket. All I'm
> interested in is creating the constraint that LogTicketID *must* be a
> value from Ticket.TicketID. I was looking for something like:
>
> > #pragma db index("index_name") member(Column)
>
> but for foreign key constraints.

Ok, let's then start from the beginning: do you want to map your
classes to an existing database schema or do you want ODB to
generate this unconventional schema for you (for some reason)?

Boris


I'm mapping my existing database schema to ODB. That's why I have these
weird issues...


More information about the odb-users mailing list