Dave.
---------- Forwarded message ----------
From:
Gray Watson <256...@gmail.com>
Date: 11 October 2011 09:43
Subject: Re: foreign keys not created
To:
ormlit...@googlegroups.comOn Oct 11, 2011, at 12:38 PM, Dave McGee wrote:
> However, when I do a "show create table" command on one of the tables - alarm, it doesn't show the foreign key references at a database level to reference the ID in the Resource table (Even though my Alarm class has a DatabaseField marked as foreign for Resource).
Aha. You are talking about foreign key _constraints_.
Yes, this is currently not supported by ORMLite. Probably I should revisit this since we now effectively have foreign keys in the tables. I'll add it to the TODO list.
With the new columnDefinition feature, you can certainly modify the generated SQL to add the constraints yourself.
http://ormlite.com/docs/column-definition
gray