Skip to content

Realtime don't work #151

Description

@basaltedr

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions