Elfocrash / Cosmonaut

šŸŒ A supercharged Azure CosmosDB .NET SDK with ORM support
https://cosmonaut.readthedocs.io
MIT License
341 stars 44 forks source link

Set Default Collection TTL #74

Open crazedpeanut opened 5 years ago

crazedpeanut commented 5 years ago

It would be nice to include the default TTL setting when creating collections.

The TTL field on a document is not acknowledged if the collection does not have TTL enabled

crazedpeanut commented 5 years ago

Created PR #75

Elfocrash commented 5 years ago

Hello @Crazedpeanut,

Iā€™m not really sure about this one. Ideally you shouldnā€™t be provisioning your collections through Cosmonaut to begin with. Cosmonaut just does the bare minimum so you donā€™t get any errors when initialising. Adding TTL would mean I have to also add every other feature related to collection creation which in return means that we will end up with a quite heavy CosmosStoreSetting object. I would have to look deeper into this one.

crazedpeanut commented 5 years ago

No stress, alternatively would a delegate to configure the collection be more appropriate? Saves Cosmonaut from having to support every field imaginable