Closed sharyuke closed 8 years ago
No, you don't have to query all columns, but you have to specify which columns are "optional"
@ObjectMapable
class MyModel {
@Column("id") // per default throwOnColumnIndexNotFound = true
long id;
@Column(value = "optionalName", throwOnColumnIndexNotFound = false)
String optionalName;
}
Then an exception will be thrown if you try to query table without id
column, but you can query table without optionalName
@sockeqwe thanks a lot.
when I query one table , must I select all of the columns ? If I select not all of the columns , it will says xxxx column does not exist.