I am trying to convert a simple POJO into a Record by using the JPA @Column annotation, however JOOQ doesn't take the values.
Here is my sql table:
create table security_roles (
id bigint not null auto_increment,
role_name varchar(255));
And here is my class:
public class SecurityRole implements Role {
private Long id;
private String roleName;
public SecurityRole() {
}
@ConstructorProperties({ "id", "role_name" })
public SecurityRole(Long id, String roleName) {
this.roleName = roleName;
}
public SecurityRolesRecord getAttachedRecord() {
return UserHelper.dsl().newRecord(Tables.SECURITY_ROLES, this);
}
@Override
@Column(name="role_name")
public String getName() {
return this.roleName;
}
public void setName(String roleName) {
this.roleName = roleName;
}
@Column(name="id")
public Long getId() {
return id;
}
public void setId(Long id) {
}
}
The resulting Record shows NULL for both values although the roleName is set.