Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support persisting Generic Types #179

Open
athieriot opened this issue Sep 25, 2017 · 2 comments
Open

Support persisting Generic Types #179

athieriot opened this issue Sep 25, 2017 · 2 comments

Comments

@athieriot
Copy link

Hello,

We have the use case of wanting to persist generic types. (Ex: Document<SomeObject>).
At runtime, after type erasure, the enclosing type is actually lost and so Catatumbo fail to be able to read the fields and annotations.

From reading and using Gson library, they solve this by accepting a ParameterizedType during Serialization/Deserialization: https://github.com/google/gson/blob/master/UserGuide.md#TOC-Serializing-and-Deserializing-Generic-Types

I was wondering if it was of some interest to support this behaviour?
(Not just us I mean 😄)

@spullabhotla Do you think it would be worthwhile to take a look at implementing that? (It might require a new set of methods in EntityManager so I'm not sure whether you want that feature or think about anything else...)

@sai-pullabhotla
Copy link
Owner

@athieriot - Is Document a top level entity or an embedded field in the entity?

@athieriot
Copy link
Author

athieriot commented Sep 27, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants