Annotation removed @PublishEntityChangedEvents

Hello.

Cuba studio. Entity editor.
Annotation @PublishEntityChangedEvents is removed every time when I switches to “Designer” tab.
Is there some way to prevent it?

Hi

Please provide more details, so we can reproduce the issue.
What Studio version do you use?
Entity source also would be very helpful.

Hi,

CUBA Studio 2018.3 (IntelliJ Edition)
Build #CS-183.10.0, build on Man 22, 2019
linux version

For example this code
https://drive.google.com/file/d/1Dju4quivJPdi0o-Foqd_QcB7I5hn7D3L/view?usp=sharing
Then I switch to “Designer” tab, and then switch back. And we got this code
https://drive.google.com/file/d/1m0AKi4O5moeh2LfuLr9msz4HCf_P2bws/view?usp=sharing

Source code:

package com.company.spmu.entity;

import com.haulmont.cuba.core.entity.StandardEntity;
import com.haulmont.cuba.core.entity.annotation.Lookup;
import com.haulmont.cuba.core.entity.annotation.LookupType;
import com.haulmont.cuba.core.entity.annotation.OnDeleteInverse;
import com.haulmont.cuba.core.entity.annotation.PublishEntityChangedEvents;
import com.haulmont.cuba.core.global.DeletePolicy;
import javax.persistence.*;
import javax.validation.constraints.NotNull;

@PublishEntityChangedEvents
@Table(name = "SPMU_PLAN_VARIANT_LIMIT")
@Entity(name = "spmu_PlanVariantLimit")
public class PlanVariantLimit extends StandardEntity {
    @Lookup(type = LookupType.DROPDOWN, actions = {"lookup"})
    @OnDeleteInverse(DeletePolicy.CASCADE)
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PLAN_VARIANT_ID")
    protected PlanVariant planVariant;

    @Column(name = "YEAR")
    protected Integer year;

    /**
     * лимит
     */
    @NotNull
    @Column(name = "VALUE", nullable = false)
    protected Double value = 0.0;

    public void setYear(Integer year) {
        this.year = year;
    }

    public Integer getYear() {
        return year;
    }

    public PlanVariant getPlanVariant() {
        return planVariant;
    }

    public Double getValue() {
        return value;
    }

    public void setPlanVariant(PlanVariant planVariant) {
        this.planVariant = planVariant;
    }

    public void setValue(Double value) {
        this.value = value;
    }

}

Please download latest Studio version.
The issue with @PublishEntityChangedEvents annotation is fixed there.

Thanks,
I will download new version from site.
Studio says “You already have the latest version of CUBA Studio and plugins installed”