Skip to content

Serializer Object/ManyToMany useCache #30

@filt3rek

Description

@filt3rek

Hej,
Is there a reason why Object has s.useCache = false; and ManyToMany has s.useCache = true; ?
There are 2 things :

  • In Object, the documentation says s.useCache = true;
  • Then I have a User class that extends Object. In this class I have a offices field that is a ManyToMany<User, Office>. And when sending a list (query's result) of users from the server to the client, I get some offices that are traced as a Date...
    Another thing to add is that I noticed that it occurs for the office that were already displayed.
    The bug disappear when setting s.useCache = false in ManyToMany class...

It's difficult to explain, take a look at the trace it makes in js console :

`ContactsApi.hx:80: 29,{office.Office#1406},TClass({
name : [ufront,db,ManyToMany]
})

Boot.hx:62 ContactsApi.hx:80: 30,{office.Office#1868},TClass({
name : [ufront,db,ManyToMany]
})

Boot.hx:62 ContactsApi.hx:80: 31,{office.Office#1653},TClass({
name : [ufront,db,ManyToMany]
})

Boot.hx:62 ContactsApi.hx:80: 32,{Mon Nov 07 2016 11:39:17 GMT+0100 (Paris, Madrid)},TClass({
name : [ufront,db,ManyToMany]
})

Boot.hx:62 ContactsApi.hx:80: 33,{office.Office#251},TClass({
name : [ufront,db,ManyToMany]
})

Boot.hx:62 ContactsApi.hx:80: 34,{Mon Nov 07 2016 11:42:15 GMT+0100 (Paris, Madrid)},TClass({
name : [ufront,db,ManyToMany]
})

Boot.hx:62 ContactsApi.hx:80: 35,{office.Office#1389},TClass({
name : [ufront,db,ManyToMany]
})

Boot.hx:62 ContactsApi.hx:80: 36,{office.Office#118},TClass({
name : [ufront,db,ManyToMany]
})

Boot.hx:62 ContactsApi.hx:80: 37,{office.Office#254},TClass({
name : [ufront,db,ManyToMany]
})`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions