Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Generic business partner entity fields in Gate #460

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ class BusinessPartner(
var legalForm: String?,

@Column(name = "is_owner")
var isOwner: Boolean?,
var isOwner: Boolean,

@Column(name = "address_bpn")
var bpnA: String?,

@Column(name = "legal_entity_bpn")
@Column(name = "bpnl")
var bpnL: String?,

@Column(name = "site_bpn")
@Column(name = "bpns")
var bpnS: String?,

@Column(name = "bpna")
var bpnA: String?,

@OneToOne(cascade = [CascadeType.ALL], orphanRemoval = true)
@JoinColumn(name = "postal_address_id", unique = true)
var postalAddress: PostalAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PostalAddress(

@Column(name = "address_type")
@Enumerated(EnumType.STRING)
var addressType: AddressType,
var addressType: AddressType?,

@Embedded
var physicalPostalAddress: PhysicalPostalAddress,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- Make field mandatory
alter table business_partners
alter column is_owner set not null;

-- Rename columns to bnpl/bpns/bpna for consistency
alter table business_partners
rename column legal_entity_bpn to bpnl;
alter table business_partners
rename column site_bpn to bpns;
alter table business_partners
rename column address_bpn to bpna;