sai-pullabhotla / catatumbo

JPA like Persistence Framework for Google Cloud Datastore and Cloud Firestore
http://catatumbo.io
Apache License 2.0
51 stars 20 forks source link

Exception when persisting List values with indexing turned off for Embedded Objects #183

Closed davidjoh0 closed 6 years ago

davidjoh0 commented 6 years ago

The fix for https://github.com/sai-pullabhotla/catatumbo/issues/101 (https://github.com/sai-pullabhotla/catatumbo/commit/69ece205766a626ea89da2cf265c4fbade4b84d1) made a change in the Marshaler class to prevent setExcludeFromIndexes being set on ListFields.

if (valueBuilder.getValueType() != ValueType.LIST) { valueBuilder.setExcludeFromIndexes(!propertyMetadata.isIndexed()); }

However, I believe a similar a similar change is required in EmbeddedObjectMapper to prevent this 'Exclude from indexes cannot be set on a list value' for Embedded Objects.

Thanks,

David Johnson

sai-pullabhotla commented 6 years ago

Hi @davidjoh0 - Thanks for reporting. I will look into it this week.

davidjoh0 commented 6 years ago

many thanks 👍