Announcement

Collapse
No announcement yet.

Updates and changes in application

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • yurikuzn
    started a topic Updates and changes in application

    Updates and changes in application

    Announcements of changes and updates in the application.

  • yurikuzn
    replied
    5.6.0 version

    View: wait method now accepts promises


    wait method holds rendering of the view until conditions met.

    Code:
        setup: function () {
                this.wait(
                    this.model.fetch()
                );
        },
    Code:
        setup: function () {
                this.wait(
                    this.getModelFactory().create('Case')
                    .then(function (model) {
                        model.id = this.model.id
                        return model.fetch();
                    }.bind(this))
                    .then(function (model) {
                        console.log(model);
                    })
                );
        },
    Code:
        setup: function () {
                this.wait(
                    Promise.all([
                        this.model.fetch(),
                        this.model.collection.fetch()
                    ])
                );
        },
    Last edited by yurikuzn; 08-06-2019, 06:29 AM.

    Leave a comment:


  • yurikuzn
    replied
    5.6.9 version

    ORM: Parameter returnSthCollection

    Can be used with find and findRelated methods. With this param provided, they will return a collection that doesn't allocate memory for all result data.

    https://github.com/espocrm/documentation/blob/master/development/orm.md#returnsthcollection


    PHP Code:

    $collection 
    $entityManager->getRepository('Email')->limit(010000)->find(['returnSthCollection' => true]);
    foreach (
    $collection as $entity) {
        
    // memory is allocated for each item, when collection is iterated

    Leave a comment:


  • yurikuzn
    replied
    5.5.0 version


    User type field

    We add Type field that will be used Instead of current multiple fields 'isAdmin', 'isPortalUser' etc. Old fields will be also supported for a while. User types: 'regular', 'admin', 'portal', 'super-admin', 'system', 'api'.


    Sorting parameters

    We introduce 'orderBy' and 'order' for sorting lists. These parameters can be passed as get paramers in API requesrs, used in frontend collections and defined in entityDefs for default sorting. Previous parameres 'sortBy' and 'asc' will be supported for a while.

    Example:

    orderBy: 'createdAt',
    order: 'desc'.

    Leave a comment:

Working...
X