I don't see what to simplify in markup like this:

    @Entity
    class User {

        @Generated
        long id;

        @Column
        string name;

        @ManyToOne
        Customer customer;

        @ManyToMany
        LazyCollection!Role roles;
    }

Which translates to table definitions like
CREATE TABLE user (id bigint not null primary key auto_increment, name varchar(255), customer_fk bigint foreign key references customer(id)); CREATE TABLE user_roles (user_fk bigint not null foreign key references user(id), role_fk int not null foreign key references role(id), primary key(user_fk, role_fk);
...

Reply via email to