vapor-community / Vii

Vii attempts to reverse engineer an existing database into Vapor 4 compatible models
MIT License
7 stars 2 forks source link

@Parent & @OptionalParent initializer doesn't match the property declaration #10

Closed jonny7 closed 4 years ago

jonny7 commented 4 years ago

The property declaration when generating is correct.

var foreignKey: User

However the initializer is still using the table's underlying data type.

init(foreignKey: Int){
    self.foreignKey = foreignKey // --> Cannot assign value of type 'int' to type 'User'
}