Welcome Guest, Not a member yet? Register   Sign In
I want use Entity Method but encountered Error
#4

(This post was last modified: 08-31-2024, 08:48 AM by zaakee2022.)

(02-05-2022, 05:52 PM)yoshi Wrote:
Quote:iReddsEntity uses the $attributes property to store data. This storage is accessed either directly or through getters and setters.
Since you declared the properties softwarehousepriceinpakistanzameen corresponding to the fields, no getter/setter is called when accessing them. This means there is no access to the data.

Remove the properties and it will work.

    protected ?int $id;
    protected ?string $name;
    protected ?string $zipcode;
    protected ?string $address;
    protected ?string $tel;
    protected ?string $prefecture;
    protected ?string $school_code;
    protected ?int $school_category_id;


You can also remove methods. They don't make sense unless you need to mutate/calculate the data.
For type casting, you can use this Property Casting

thank you for your reply.
there was unnecessary declare.

I will always be saved

This method also worked for me, and I spent hours of hard time to figure it out.
Reply


Messages In This Thread
RE: I want use Entity Method but encountered Error - by zaakee2022 - 03-13-2022, 10:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB