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 for enumeration mapping [DATACASS-141] #318

Closed
spring-projects-issues opened this issue Jul 23, 2014 · 4 comments
Closed

Support for enumeration mapping [DATACASS-141] #318

spring-projects-issues opened this issue Jul 23, 2014 · 4 comments
Assignees
Labels
status: duplicate type: enhancement

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Jul 23, 2014

Stephan Wienczny opened DATACASS-141 and commented

Trying to save an entity with an enumeration field yields to

java.lang.IllegalArgumentException: Invalid value SOMEVALUE of type unknown to the query builder

in com.datastax.driver.core.querybuilder.Utils:134

IMHO there are two ways to solve this bug:

  1. Map enum values in spring-data-cassandra
  2. Have Datastax Java Driver map enums

If you decide to go 2. please add a link to the remote tracker to this issue


Issue Links:

  • DATACASS-83 Support custom field mappings
    ("depends on")
  • DATACASS-260 Enum properties cannot be written
    ("is superseded by")

3 votes, 3 watchers

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Apr 7, 2016

Mark Paluch commented

Fixed with DATACASS-260

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 23, 2016

Marc Pynaert commented

With 1.5.0-BUILD-SNAPSHOT, I'm still getting the following error:

org.springframework.dao.InvalidDataAccessApiUsageException: Unknown type [class ...NotificationStatus] for property [status] in entity [...Notification]; only primitive types and Collections or Maps of primitive types are allowed

I have the following annotation on my attribute (after seeing your comment on http://stackoverflow.com/questions/36057569/how-to-store-enum-into-cassandra-with-springdata):

@CassandraType(type = DataType.Name.VARCHAR)
private NotificationStatus status;

Is there something I'm missing?

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 23, 2016

Mark Paluch commented

Care to file a ticket with a reproducible test case?

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 23, 2016

Marc Pynaert commented

I created the issue https://jira.spring.io/browse/DATACASS-374 containing an IntelliJ Community project

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

No branches or pull requests

2 participants