Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-1286

SerializeJSON doesn't Serialize ORM Entities

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.3.0.010
    • Fix Version/s: 3.3.0.011
    • Labels:
      None
    • Environment:

      Tomcat, CloudBees

    • Steps to Reproduce:
      Hide

      var aExamples = EntityLoad("Example",

      {item="cfdump"}

      );
      for(e in aExamples)

      { dump(SerializeJSON(e)); }

      the component is defined as:

      component persistent="true" entityname="example" table="examples"

      { property name="id" column="id" generator="increment"; property name="item"; property name="description" ormtype="text"; property name="example" ormtype="text"; property name="output" ormtype="text"; }
      Show
      var aExamples = EntityLoad("Example", {item="cfdump"} ); for(e in aExamples) { dump(SerializeJSON(e)); } the component is defined as: component persistent="true" entityname="example" table="examples" { property name="id" column="id" generator="increment"; property name="item"; property name="description" ormtype="text"; property name="example" ormtype="text"; property name="output" ormtype="text"; }

      Description

      SerializeJSON(EntityLoad("example")) returns an empty structure like "{}" on an object that has been found.

      Serialize works and returns "evaluateComponent('orm.Example','179990d98644bd8eec2e6fd64c49aa28',struct(),struct('id':0,'description':'This is an example field','item':'cfdump','example':'This is a code field','output':'This is what would be output'))"

      The code I used was the following:

      var aExamples = EntityLoad("Example",

      {item="cfdump"}

      );
      for(e in aExamples)

      { dump(Serialize(e)); }

        Gliffy Diagrams

          Activity

          Hide
          micstriit Michael Offner added a comment -

          testcase attached

          Show
          micstriit Michael Offner added a comment - testcase attached
          Hide
          micstriit Michael Offner added a comment -

          tnx for input

          Show
          micstriit Michael Offner added a comment - tnx for input

            People

            • Assignee:
              micstriit Michael Offner
              Reporter:
              markdrew Mark Drew
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development