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

Realtime don't work #151

Open
dieyne opened this issue Jul 9, 2019 · 0 comments
Open

Realtime don't work #151

dieyne opened this issue Jul 9, 2019 · 0 comments

Comments

@dieyne
Copy link

dieyne commented Jul 9, 2019

Real time does not work
When I load my page for the first time the data is loaded but when there is a change on a data, the detection is not triggered.
fireloop version : 1.0.0-beta.2.7

this.realtime.onReady().subscribe(() => {
      this.profileRef = this.realtime.FireLoop.ref<Profile>(Profile);
      this.profileRef
        .on("change", {
          limit: 10,
          order: "id DESC",
          include: "user",
        })
        .subscribe(res => {
          console.log("change...", res);
        });
    });

// method to add new profile
add() {
    const prof: any = {
      type: 1,
      firstName: "xxx",
      lastName: "xxxx",
      phone: 1234567,
    };
    this.profileRef.upsert(prof).subscribe(res => {
      console.log(res);
    });
  }```

The first time i load my page the server :
@mean-expert/loopback-component-realtime: FireLoop is releasing context tree with id 7986488687573 from memory
@mean-expert/loopback-component-realtime: FireLoop setting write relation: Profile.user.create.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting write relation: Profile.user.upsert.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting write relation: Profile.user.remove.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting up: Profile.value.broadcast.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting read relation: Profile.user.value.pull.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting up: Profile.change.broadcast.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting read relation: Profile.user.change.pull.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting up: Profile.child_added.broadcast.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting read relation: Profile.user.child_added.pull.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting read relation: Profile.user.child_updated.pull.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting read relation: Profile.user.child_removed.pull.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting up: Profile.stats.broadcast.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop setting read relation: Profile.user.stats.pull.request.603932351843982
@mean-expert/loopback-component-realtime: FireLoop model pull request received: {"limit":10,"order":"id DESC","include":"user"}

After the method add is perform the server log :

profile: Before Save
@mean-expert/loopback-component-realtime: FireLoop value broadcasting
@mean-expert/loopback-component-realtime: FireLoop child_changed broadcasting
@mean-expert/loopback-component-realtime: FireLoop change broadcasting
@mean-expert/loopback-component-realtime: FireLoop stats broadcasting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant