0

我的类 Customer 和 Adress 之间有关系如果我在我的项目上运行构建,将生成带有后缀 _ 的类。但是在这一代期间发生了错误:

错误:(108, 54) 错误:找不到符号变量 Adress_

在这个地方:

/** 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;
            }
        });

客户类别:

    @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;
    }
}

地址类:

    @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;
    }
}

所以似乎没有生成Adress_类??

4

0 回答 0