![]() |
Entity uses the $attributes property to store data. This storage is accessed either directly or through getters and setters.
Since you declared the properties 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. PHP Code: protected ?int $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 |
Messages In This Thread |
I want use Entity Method but encountered Error - by yoshi - 02-05-2022, 05:35 AM
RE: I want use Entity Method but encountered Error - by iRedds - 02-05-2022, 07:46 AM
RE: I want use Entity Method but encountered Error - by yoshi - 02-05-2022, 05:52 PM
RE: I want use Entity Method but encountered Error - by zaakee2022 - 03-13-2022, 10:22 AM
|