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

Using java annotations instead of scala type aliases does not work #131

Open
yanns opened this issue Oct 10, 2019 · 2 comments
Open

Using java annotations instead of scala type aliases does not work #131

yanns opened this issue Oct 10, 2019 · 2 comments

Comments

@yanns
Copy link
Contributor

yanns commented Oct 10, 2019

Using java annotations directly has no effect.
One have to use the scala type aliases.

Ex:

import io.sphere.mongo.generic.annotations.MongoKey
case class Student(
  @MongoKey("_id") id: String
)

does not work.

The following works

import io.sphere.mongo.generic.MongoKey
case class Student(
  @MongoKey("_id") id: String
)
@yanns
Copy link
Contributor Author

yanns commented Oct 10, 2019

#52 was a try to fix that, but it does not really fix the issue.

@yanns
Copy link
Contributor Author

yanns commented Feb 4, 2020

An experimental branch is using magnolia for the derivation. It is only using scala annotation, fixing this issue: https://github.com/sphereio/sphere-scala-libs/tree/derive_with_magnolia

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

1 participant