Welcome Guest, Not a member yet? Register   Sign In
Insert Batch Using Entity Classes
#3

(05-14-2024, 02:44 AM)kenjis Wrote: It seems you misunderstand Entities (or PHP objects).

You created an User entity, and filled chairman's data.
The $user object represents chairman.
After saving it, you filled admin's data into chairman's object.
And you saved it. That means you saved chairman's entity.

If you want to use another User entity, create a new User entity with $user = new User();

I think there is a simpler way apart from creating a new entity object. Thanks for quick response.
Reply


Messages In This Thread
Insert Batch Using Entity Classes - by warcooft - 05-13-2024, 10:57 PM
RE: Insert Batch Using Entity Classes - by kenjis - 05-14-2024, 02:44 AM
RE: Insert Batch Using Entity Classes - by warcooft - 05-14-2024, 02:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB