No attribute named 'id' is defined even through I set it as a session attribute

Im getting No attribute named ‘id’ is defined

this is my code

val scn = scenario("Auto Save Load Test")
    http("Getting entry")
      .check(, jsonPath("$").saveAs("entry")))

  .exec(session => {
  val textEntry = session("entry").as[Entry]
  val updated = textEntry.copy(title = "This is the title set in the gatling test")
  session.set("entry", updated).set("id",})

    http("Setting title")
      .body(StringBody( """${entry}""")).asJSON
      .check(, jsonPath("$").saveAs("entry")))


Can someone please tell me what I am doing wrong

I would say your jsonPath is not retrieving any value.

Test it here.