Uploaded image for project: 'Spring Data for Apache Cassandra'
  1. Spring Data for Apache Cassandra
  2. DATACASS-260

Enum properties cannot be written

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.2 (Gosling SR2), 1.4 M1 (Hopper)
    • Fix Version/s: 1.5 M1 (Ingalls)
    • Component/s: None
    • Labels:

      Description

      Mapping of enum types is not supported yet. The mapping converter uses the property data type to determine a converter. The value is not converted into a string or numeric value because the source and target type are the same. Spring Data Cassandra has no built-in support for enums and also @CassandraType annotations are not used while writing an Entity (insert/update/delete).

      Example code expected to work:

      @Table("book")
      public class Book {
      
      	@PrimaryKey
      	private String isbn;
      	
      	private Condition condition;
      
      	// getter/setter omitted.
      }
      
      public enum Condition {
      	MINT, MHHKAY, NOT_SO_GOOD;
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mp911de Mark Paluch
              Reporter:
              mp911de Mark Paluch
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 21 weeks, 2 days ago