Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Issue while accessing relation

    General Discussion
    2
    4
    209
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      suyashcyber94 last edited by

      Hello Team,

      I am facing a very strange issue. I would like to explain below:

      I have extended the Cart model.

      f07027da-fe2c-4ea5-8905-35be74fcec3d-image.png

      When I use this cart model to fetch result including eager loaded timeslot, it works
      38b64119-cfbe-4175-8548-b8b56b45d41e-image.png
      bd5a7167-7df6-4d35-9074-647d922b834f-image.png

      But later, when I access the timeslot, it is giving me null, however there is data present as per the above screenshot
      f61610d6-88f8-411e-b5ac-a79df84230d8-image.png
      e87e3f02-90a0-4a77-a93b-142edbc7c661-image.png

      Can anyone help me identifying the issue why this is occurring. I am stuck from a long time.

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @suyashcyber94,

        Data may be present but the last screenshot is looks like timeslot is null.

        1 Reply Last reply Reply Quote 0
        • S
          suyashcyber94 last edited by

          Hi, thanks for your revert.

          As you can check in the above screenshot, the timeslot is not null as its relation is having data:

          7b7a45e1-b16f-400d-9fbc-ba23265128a8-image.png

          Do you think anything is still wrong?

          1 Reply Last reply Reply Quote 0
          • devansh-webkul
            devansh-webkul last edited by

            Please check your code, may be some thing is missing.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post