Fixed a typo in the DB migration
parent
1b10e695b7
commit
35db22cd36
|
|
@ -101,14 +101,12 @@ public class Person extends ContactableEntity {
|
||||||
private LocalDate birthdate;
|
private LocalDate birthdate;
|
||||||
|
|
||||||
public Person() {
|
public Person() {
|
||||||
|
|
||||||
super();
|
super();
|
||||||
|
|
||||||
personNames = new ArrayList<>();
|
personNames = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<PersonName> getPersonNames() {
|
public List<PersonName> getPersonNames() {
|
||||||
|
|
||||||
return Collections.unmodifiableList(personNames);
|
return Collections.unmodifiableList(personNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -118,7 +116,6 @@ public class Person extends ContactableEntity {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public PersonName getPersonName() {
|
public PersonName getPersonName() {
|
||||||
|
|
||||||
if (personNames.isEmpty()) {
|
if (personNames.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -127,17 +124,14 @@ public class Person extends ContactableEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addPersonName(final PersonName personName) {
|
protected void addPersonName(final PersonName personName) {
|
||||||
|
|
||||||
personNames.add(personName);
|
personNames.add(personName);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void removePersonName(final PersonName personName) {
|
protected void removePersonName(final PersonName personName) {
|
||||||
|
|
||||||
personNames.remove(personName);
|
personNames.remove(personName);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setPersonNames(final List<PersonName> personNames) {
|
protected void setPersonNames(final List<PersonName> personNames) {
|
||||||
|
|
||||||
this.personNames = new ArrayList<>(personNames);
|
this.personNames = new ArrayList<>(personNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,7 +157,6 @@ public class Person extends ContactableEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(final Object obj) {
|
public boolean equals(final Object obj) {
|
||||||
|
|
||||||
if (this == obj) {
|
if (this == obj) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -201,13 +194,11 @@ public class Person extends ContactableEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEqual(final Object obj) {
|
public boolean canEqual(final Object obj) {
|
||||||
|
|
||||||
return obj instanceof Person;
|
return obj instanceof Person;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(final String data) {
|
public String toString(final String data) {
|
||||||
|
|
||||||
return super.toString(
|
return super.toString(
|
||||||
String.format(
|
String.format(
|
||||||
// "surname = \"%s\", +"
|
// "surname = \"%s\", +"
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ create table CCM_CMS.Person_PersonName_AUD (
|
||||||
);
|
);
|
||||||
insert into ccm_cms.person_personname_aud (rev, person_id, person_name_id, revtype, revend) (select rev, person_id, person_name_id, revtype, revend from ccm_cms.person_names_aud);
|
insert into ccm_cms.person_personname_aud (rev, person_id, person_name_id, revtype, revend) (select rev, person_id, person_name_id, revtype, revend from ccm_cms.person_names_aud);
|
||||||
|
|
||||||
|
alter table ccm_cms.person_names drop column person_id;
|
||||||
alter table ccm_cms.person_names_aud drop column person_id;
|
alter table ccm_cms.person_names_aud drop column person_id;
|
||||||
|
|
||||||
alter table CCM_CMS.Person_PersonName_AUD
|
alter table CCM_CMS.Person_PersonName_AUD
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue