Akita: EntityStore - Entities with ID 0

Created on 1 Jul 2018  路  2Comments  路  Source: datorama/akita

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[x ] Other... Please describe: Question

Current behavior

As I did not find related information in documentation, I'm not sure whether it was designed like this on purpose or not.
EntityStore removes all entities when entity id is 0.
In my case I have entities which are generated in app when the id is a sequence starting from 0.
I have modified it to start from 1 but brought this up only for your attention.

I guess its because of the following where id ? returns false

remove(id?: ID | ID[], resetActive?) {
    if (!toBoolean(id)) this.setPristine();

    const ids = id ? coerceArray(id) : null;
    this.setState(state => _crud._remove(state, ids, resetActive));
  }

Version 1.1.0

bug

Most helpful comment

This is a bug. Thanks. I will release a fix in 15min.

All 2 comments

This is a bug. Thanks. I will release a fix in 15min.

You can download v1.1.1. Thanks for the report.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johanrin picture johanrin  路  7Comments

twittwer picture twittwer  路  7Comments

zvnt picture zvnt  路  6Comments

brgrz picture brgrz  路  4Comments

DmitryEfimenko picture DmitryEfimenko  路  6Comments