Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-1730

Error after updating attribute's data type of an Atlas type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8-incubating
    • 0.8.1, 1.0.0
    • atlas-core
    • None

    Description

      1.Created a type with one of its attributes' type as date and POSTed the type definition to

      /api/atlas/v2/types/typedefs
      

      2. Tried to update the attribute data type to string , hence modified the JSON (changed "date" to "string") and PUT the JSON to the same API which succeeded.
      3. Tried to create an entity of the type and provided "val1" as value for the string attribute (which was updated from date).
      4. Entity creation failed with

      java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
      

      This could be a rare one but this scenario might cause issues when user initially gave data type as "date" by mistake and wants to update it as "string".
      Also , since attribute delete is not allowed as part of type update , attribute with "date" type can't be deleted and recreated with string.

      Attachments

        Activity

          People

            apoorvnaik Apoorv Naik
            sharmadhas Sharmadha S
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: