Railo
  1. Railo
  2. RAILO-1286

SerializeJSON doesn't Serialize ORM Entities

    Details

    • Type: Bug Bug
    • Status: Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 3.3.0.010
    • Fix Version/s: 3.3.0.011
    • Security Level: Public (Everyone can see)
    • 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"; }
    • Similar Issues:
      Show 10 results 

      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)); }

        Activity

        Hide
        Michael Offner added a comment -

        testcase attached

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

        tnx for input

        Show
        Michael Offner added a comment - tnx for input

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development