ObjectBox error during generating classes

338 views Asked by At

I have a relation between my classes Customer and Adress If I run the build on my project the classes with the suffix _ will generate. But during this generation an error occurs:

Error:(108, 54) error: cannot find symbol variable Adress_

at this place:

/** To-one relation "adress" to target entity "Adress". */
public static final RelationInfo<Adress> adress =
        new RelationInfo<>(Customer_.__INSTANCE, Adress_.__INSTANCE, null, new ToOneGetter<Customer>() {
            @Override
            public ToOne<Adress> getToOne(Customer entity) {
                return entity.adress;
            }
        });

Customer Class:

    @Entity
    public class Customer {

    @Id long id;

    private String firstname;
    private String lastname;
    private String phone;

    ToOne<Adress> adress;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getFirstname() {
        return firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public ToOne<Adress> getAdress() {
        return adress;
    }

    public void setAdress(ToOne<Adress> adress) {
        this.adress = adress;
    }
}

Adress Class:

    @Entity
    public class Adress {

    @Id long id;

    private String street;
    private String city;
    private String zip;
    private String country;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getZip() {
        return zip;
    }

    public void setZip(String zip) {
        this.zip = zip;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }
}

So it seems that the Adress_ class doesn't be generated??

0

There are 0 answers