Skip to content

orm update has cache #626

Closed
Closed

Description

@lonso

when i update model, i change data on mysql command line.
But i orm2,the data not change need i use
orm.singleton.clear();
that data will be change.
why?

Activity

  1. newradius commented on May 25, 2015

    @newradius

    I had the same problem and I lost like 2 hours so I disabled the cache globally.
    db.settings.set('instance.cache', false);

  2. dxg commented on May 25, 2015

    @dxg
    Collaborator

    The cache isn't really a cache, but a singleton pattern.
    Did you update the model via ORM calls or SQL?

    I too disabled it globally.

  3. newradius commented on May 25, 2015

    @newradius

    I update via ORM calls.

  4. dxg commented on May 26, 2015

    @dxg
    Collaborator

    Can you provide a limited code sample? Like the one here.

  5. newradius commented on May 26, 2015

    @newradius

    If i try to update the same object, it only updates 1 time. Let's say I want to update an UserRole I retrieve the user with .get and update it but if I want to update it againt the UserRole doesn't update the 2nd time.

  6. dxg commented on May 28, 2015

    @dxg
    Collaborator

    If you provide a code sample or even better, a failing test case, then I may be able to do something with it.

  7. Sebush commented on Aug 19, 2015

    @Sebush

    cache and cluster... how can i purge the "cache" in cluster-express-configuration? my solution at the moment is to disable orm-cache

  8. dxg commented on Aug 20, 2015

    @dxg
    Collaborator

    Orm cache isn't a cache at all, but an identity map. I don't see anything wrong with disabling it.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions