Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.7.1 - SQL Mapper no autohydrate on insert/update #292

Closed
diapolon opened this issue Feb 4, 2020 · 2 comments
Closed

3.7.1 - SQL Mapper no autohydrate on insert/update #292

diapolon opened this issue Feb 4, 2020 · 2 comments

Comments

@diapolon
Copy link

diapolon commented Feb 4, 2020

Hi, with latest version, after calling save() method, F3 wont auto-hydrate the object.
Example:
i have a table with id primary key,
foreach($data as $key => $value) $this->set($key, $value); $this->save(); echo $this->id;
with 3.6.x it return current id if update or new id if insert.
With 3.7.x it return null or empty

@ikkez ikkez added the duplicate label Feb 4, 2020
@ikkez
Copy link
Member

ikkez commented Feb 4, 2020

duplicate bcosca/fatfree#1175

I'm still not able to reproduce this.. works fine in 3.7.1 and dev-master. I need more information about your model and other helpful context.

@ikkez
Copy link
Member

ikkez commented Feb 4, 2020

I found out that when you set id = 0, it'll cause the mapper to not reload since 3.7.1.. if that's a bug or not will be discussed in bcosca/fatfree#1175 .. as quick workaround for you: dont set id to 0... doesnt make sense anyways. thank you

@ikkez ikkez closed this as completed Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants