Skip to content

Instantly share code, notes, and snippets.

@sumanentc
Last active October 28, 2019 15:33
Show Gist options
  • Save sumanentc/4688036ed7f74ec94c11ce7d963d74bc to your computer and use it in GitHub Desktop.
Save sumanentc/4688036ed7f74ec94c11ce7d963d74bc to your computer and use it in GitHub Desktop.
@Entity
@Table(name = "city")
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "string")})
@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
public class City implements Serializable,TenantSupport {
private static final long serialVersionUID = -4551953276601557391L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
@Column(name = "tenant_id")
private String tenantId;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment