pardom/ActiveAndroid — pull request #32 by vonloxley (2013-01-21 13:39:17+00:00)
Title: Wrong reference generation

References are targeted at their own table, not at the referenced table.
```java
public class Dough extends Model {
@Column(name = "name", notNull=true, unique=true)
public String name;
[…]
@Table(name = "Ingredient")
public class Ingredient extends Model {
@Column(name = "name", notNull=true)
public String name;

@Column(name = "dough")
public Dough dough;

```
should be
```sql
CREATE TABLE Ingredient (
Id INTEGER PRIMARY KEY AUTOINCREMENT
, name TEXT NOT NULL ON CONFLICT FAIL
, dough INTEGER REFERENCES Dough(Id) ON DELETE NO ACTION ON UPDATE NO ACTION);
```
but
```sql
CREATE TABLE Ingredient (
Id INTEGER PRIMARY KEY AUTOINCREMENT
, name TEXT NOT NULL ON CONFLICT FAIL
, dough INTEGER REFERENCES Ingredient(Id) ON DELETE NO ACTION ON UPDATE NO ACTION);
```
is generated.