Hi,
I'm using validator-3.1, core-3.3.1, annotations-3.4.
Here is my problem, may be a bug:
Code:
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class Parent
{
    @Id
    int id;
    @Column(nullable = true)
    String string;
    public int getId() { return this.id; }
    public String getString() { return this.string; }
}
@Entity
public class CanBeNull
    extends Parent
{
}
@Entity
public class CannotBeNull
    extends Parent
{
    // omitted for demo: @Column(nullable = false)
    @NotNull
    @Override
    public String getString() { return this.string; }
}
Now the DDL looks like:
Code:
CREATE TABLE cannot_be_nulls
(
  id integer NOT NULL,
  string character varying(255) NOT NULL,
  CONSTRAINT cannot_be_nulls_pkey PRIMARY KEY (id)
)
CREATE TABLE can_be_nulls
(
  id integer NOT NULL,
  string character varying(255) *************NOT NULL*******************,
  CONSTRAINT can_be_nulls_pkey PRIMARY KEY (id)
)
This does not happen if I use @MappedSuperclass on Parent, but I need @Entity because some other entity have references to Parent.
This is quite annoying... Is there something i can do, is this a bug (looks like), should i open an issue on jira ?
Thanks
David