我正面临这个问题,我的实体简介是:
@Entity
@Table(name="profile")
@Multitenant(value=MultitenantType.TABLE_PER_TENANT)
@TenantTableDiscriminator(type=TenantTableDiscriminatorType.SCHEMA, contextProperty="eclipselink.tenant-id")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.STRING, length = 17)
public class Profile implements Serializable, Comparable<Profile> {
private static final long serialVersionUID = 1L;
@Id
@SequenceGenerator(name = "profile_id_generator", sequenceName = "profile_identification_seq", allocationSize = 1, schema = ?)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "profile_id_generator")
@Column(unique = true, nullable = false)
@Expose
private Integer identification;
请问,如何根据当前用户tenant-id
在@SequenceGenerator注释中设置架构?