Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3113

Register FlexJSON's DateObjectFactory depending on @DateTimeFormat on entities

    XMLWordPrintable

    Details

      Description

      Steps:

      • Create a jpa entity with a java.util.Date field and use @DateTimeFormat (whatever)
      • use json all to generate Entity_Roo_Json.aj
      • trying to deserialize a date with iso-8601 format (like javascrip's, yyyy-MM-ddThh:mm:ss) gets an error, forcing to rewrite the two deserialize methods for each entity

      whatever was tried with style="M-", pattern="yyyy-MM-ddThh:mm:ss" and iso = ISO.DATE_TIME. This issue could be solved by customizing FlexJson's deserializer in the Entity_Roo_Json.aj using a flexjson.factories.DateObjectFactory with the list of patterns used by the entity's date fields

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dtortola Dario Tortola
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Remaining Estimate - 1d
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified