diesieben07
03/30/2019, 1:14 PMobject UserModel : Model {
val name by VarcharField()
}
From that I am doing to generate code like this (using an annotation processor):
data class User(val name: String)
If I now have a call like dataSource.findAll(UserModel) how can I express to the compiler that this returns List<User>?Pavlo Liapota
03/30/2019, 1:44 PMdiesieben07
03/30/2019, 1:48 PMUser is generated by an annotation processor.Pavlo Liapota
03/30/2019, 1:49 PMdiesieben07
03/30/2019, 1:51 PMfindAll<User> { it.name eq "Peter" } where it has to be UserModel, not Userdiesieben07
03/30/2019, 1:52 PMPavlo Liapota
03/30/2019, 1:56 PMfindAll(UserModel) { it.name eq "Peter" }
looks almost the same 🙂diesieben07
03/30/2019, 1:57 PMdiesieben07
03/30/2019, 7:30 PM@Varchar val name: Int is not a compile-time error, even though it should be.