A bugfix for ccm-sci-assets-publicationsperson
git-svn-id: https://svn.libreccm.org/ccm/trunk@2668 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
ebede11827
commit
0dd6e8ff55
|
|
@ -51,7 +51,7 @@ object type SciPublicationsPersonsPublicationsPersons extends ACSObject {
|
||||||
|
|
||||||
association {
|
association {
|
||||||
|
|
||||||
composite ContentItem[1..1] owner = join ca_publications_persons_publications_persons_asset.owner_id
|
composite ContentItem[1..1] owningPublication = join ca_publications_persons_publications_persons_asset.owner_id
|
||||||
to cms_items.item_id;
|
to cms_items.item_id;
|
||||||
|
|
||||||
component SciPublicationsPersonsPublicationsPersons[0..1] publicationsPersons = join cms_items.item_id
|
component SciPublicationsPersonsPublicationsPersons[0..1] publicationsPersons = join cms_items.item_id
|
||||||
|
|
@ -67,7 +67,7 @@ object type SciPublicationsPersonsPersonsPublications extends ACSObject {
|
||||||
|
|
||||||
association {
|
association {
|
||||||
|
|
||||||
composite ContentItem[1..1] owner = join ca_publications_persons_persons_publications_asset.owner_id
|
composite ContentItem[1..1] owningPerson = join ca_publications_persons_persons_publications_asset.owner_id
|
||||||
to cms_items.item_id;
|
to cms_items.item_id;
|
||||||
|
|
||||||
component SciPublicationsPersonsPersonsPublications[0..1] personsPublications = join cms_items.item_id
|
component SciPublicationsPersonsPersonsPublications[0..1] personsPublications = join cms_items.item_id
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ public class SciPublicationsPersonsPersonsPublications extends ACSObject {
|
||||||
|
|
||||||
public static final String PUBLICATIONS = "publications";
|
public static final String PUBLICATIONS = "publications";
|
||||||
public static final String PERSONS_PUBLICATIONS = "personsPublications";
|
public static final String PERSONS_PUBLICATIONS = "personsPublications";
|
||||||
public static final String OWNER = "owner";
|
public static final String OWNER = "owningPerson";
|
||||||
|
|
||||||
public SciPublicationsPersonsPersonsPublications() {
|
public SciPublicationsPersonsPersonsPublications() {
|
||||||
super(BASE_DATA_OBJECT_TYPE);
|
this(BASE_DATA_OBJECT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SciPublicationsPersonsPersonsPublications(final String type) {
|
public SciPublicationsPersonsPersonsPublications(final String type) {
|
||||||
|
|
@ -70,9 +70,11 @@ public class SciPublicationsPersonsPersonsPublications extends ACSObject {
|
||||||
final SciPublicationsPersonsPersonsPublications publications
|
final SciPublicationsPersonsPersonsPublications publications
|
||||||
= new SciPublicationsPersonsPersonsPublications();
|
= new SciPublicationsPersonsPersonsPublications();
|
||||||
publications.set(OWNER, instance);
|
publications.set(OWNER, instance);
|
||||||
|
instance.set(PERSONS_PUBLICATIONS, publications);
|
||||||
publications.update();
|
publications.update();
|
||||||
|
|
||||||
publications.save();
|
publications.save();
|
||||||
|
instance.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPublications() {
|
public String getPublications() {
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@ public class SciPublicationsPersonsPublicationsPersons extends ACSObject {
|
||||||
|
|
||||||
public static final String PUBLICATIONS_PERSONS = "publicationsPersons";
|
public static final String PUBLICATIONS_PERSONS = "publicationsPersons";
|
||||||
public static final String PERSONS = "persons";
|
public static final String PERSONS = "persons";
|
||||||
public static final String OWNER = "owner";
|
public static final String OWNER = "owningPublication";
|
||||||
|
|
||||||
public SciPublicationsPersonsPublicationsPersons() {
|
public SciPublicationsPersonsPublicationsPersons() {
|
||||||
super(BASE_DATA_OBJECT_TYPE);
|
this(BASE_DATA_OBJECT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SciPublicationsPersonsPublicationsPersons(final String type) {
|
public SciPublicationsPersonsPublicationsPersons(final String type) {
|
||||||
|
|
@ -70,9 +70,11 @@ public class SciPublicationsPersonsPublicationsPersons extends ACSObject {
|
||||||
final SciPublicationsPersonsPublicationsPersons persons
|
final SciPublicationsPersonsPublicationsPersons persons
|
||||||
= new SciPublicationsPersonsPublicationsPersons();
|
= new SciPublicationsPersonsPublicationsPersons();
|
||||||
persons.set(OWNER, instance);
|
persons.set(OWNER, instance);
|
||||||
|
instance.set(PUBLICATIONS_PERSONS, persons);
|
||||||
persons.update();
|
persons.update();
|
||||||
|
|
||||||
persons.save();
|
persons.save();
|
||||||
|
instance.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPersons() {
|
public String getPersons() {
|
||||||
|
|
|
||||||
|
|
@ -83,12 +83,13 @@ public class SciPublicationsPersonsService {
|
||||||
final PublicationBundle publicationBundle = publication.getPublicationBundle();
|
final PublicationBundle publicationBundle = publication.getPublicationBundle();
|
||||||
|
|
||||||
personBundle.remove(PUBLICATIONS, publicationBundle);
|
personBundle.remove(PUBLICATIONS, publicationBundle);
|
||||||
final DataObject personsAsset = (DataObject) person.get(PUBLICATIONS_PERSONS);
|
final DataObject publicationsAsset = (DataObject) person.get(PERSONS_PUBLICATIONS);
|
||||||
final SciPublicationsPersonsPublicationsPersons persons = new SciPublicationsPersonsPublicationsPersons(personsAsset);
|
|
||||||
persons.update();
|
|
||||||
final DataObject publicationsAsset = (DataObject) publication.get(PERSONS_PUBLICATIONS);
|
|
||||||
final SciPublicationsPersonsPersonsPublications publications = new SciPublicationsPersonsPersonsPublications(publicationsAsset);
|
final SciPublicationsPersonsPersonsPublications publications = new SciPublicationsPersonsPersonsPublications(publicationsAsset);
|
||||||
publications.update();
|
publications.update();
|
||||||
|
final DataObject personsAsset = (DataObject) publication.get(PUBLICATIONS_PERSONS);
|
||||||
|
final SciPublicationsPersonsPublicationsPersons persons = new SciPublicationsPersonsPublicationsPersons(personsAsset);
|
||||||
|
persons.update();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue