Entity reference attribute as DiscriminatorColumn

There are three entities

@Table(name = "COMPANY")
@Entity(name = "test_Company")
public class Company extends BaseStringIdEntity {

	@Id
	@Column(name = "ID", nullable = false, length = 32)
	private String id;

	@Column(name = "NAME", unique = true)
	private String name;
	
	.....
}
@Table(name = "CLIENT")
@Entity(name = "test_Client")
public class Client extends BaseStringIdEntity {

	@Id
	@Column(name = "ID", nullable = false, length = 32)
	private String id;

	@Column(name = "NAME", unique = true)
	private String name;
	
	.....
}
@Table(name = "CLIENT")
@Entity(name = "test_Agent")
public class Agent extends Client {

	@Id
	@Column(name = "ID", nullable = false, length = 32)
	private String id;

	@Column(name = "NAME", unique = true)
	private String name;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "COMPANY_ID")
	@NotNull
	private Company company;	
	
	.....
}

Client and Agent use single database table.
Client.company always is null.
Agent.company always is not null.

How to configure @DiscriminatorColumn and @DiscriminatorValue in my case ?

Hi,
There has to be some discriminator column.
“COMPANY_ID is not null” condition can’t be used.
Are you creating entities from existing database schema, or creating them from scratch in the project?