New Error on 0.3.0 - Missing Properties
Running Kotlin, the following code used to work just fine on 0.2.0.
val table = airtable.base("BASE").table("TABLE", AirtableItem::class.java)
val existingItems = table.select()
On 0.3.0 it's throwing the following:
java.lang.IllegalArgumentException: cloud.AirtableOrderItem does not have a property corresponding to [type]
Apparently 0.3.0 expects all columns to exist on the bean (there is a column called 'type' in the table)? There has got to be a better way?
@easycheese After a bit of digging, it seems the behavior of this function private void setProperty(T retval, String key, Object value) has changed a bit. It now throws an exception when a returned attribute doesn't match a property on the destination object. I switched this to a LOG.warn(... similar to the previous behavior and commented out a test: public void testSetPropertyNonexistentField(). This was enough to restore behavior to the 0.2.2 version.
@stritti , what do you think about making this behavior configurable? I imagine most people do not wish to have to define all attributes in their destination objects, especially if Table attributes are added after the destination object code is written.
As an alternative strategy, if all methods which return a record instance allowed us to provide a restricted set of fields (similar to the select() method), we could make sure to supply the limited set when calling getById() or other similar methods.