From 1a9c5424747c3dd5d807896b5bad5f467b938626 Mon Sep 17 00:00:00 2001 From: jensp Date: Wed, 10 Jul 2013 15:38:38 +0000 Subject: [PATCH] =?UTF-8?q?RelationAttributes=20(Database=20Driven=20Enum)?= =?UTF-8?q?=20werden=20jetzt=20bereits=20im=20Loader=20von=20ccm-sci-bundl?= =?UTF-8?q?e=20mit=20Werten=20gef=C3=BCllt=20(Ticket=20#1733).=20Au=C3=9Fe?= =?UTF-8?q?rdem=20einige=20technische=20=C3=84nderungen=20an=20RelationAtt?= =?UTF-8?q?ribute.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@2251 8810af33-2d31-482b-a856-94f89814c4df --- ccm-cms/application.xml | 2 +- .../content-section/RelationAttribute.pdl | 7 +- ccm-cms/src/ccm-cms.upgrade | 4 + .../src/com/arsdigita/cms/Initializer.java | 122 ++++++------ .../com/arsdigita/cms/RelationAttribute.java | 6 +- .../cms/RelationAttributeImportTool.java | 188 ++++++++++++++++++ .../cms/upgrade/PersonsStrColumn.java | 4 +- .../upgrade/RelationAttributeACSObject.java | 187 +++++++++++++++++ .../bundles/base/res/bundle/ddenums.xml | 173 ++++++++++++++++ .../bundles/demo/res/bundle/ddenums.xml | 173 ++++++++++++++++ .../bundles/devel/res/bundle/ddenums.xml | 173 ++++++++++++++++ .../bundles/extended/res/bundle/ddenums.xml | 173 ++++++++++++++++ .../bundles/standard/res/bundle/ddenums.xml | 173 ++++++++++++++++ .../src/com/arsdigita/bundle/Initializer.java | 3 + .../src/com/arsdigita/bundle/Loader.java | 96 ++++----- 15 files changed, 1371 insertions(+), 113 deletions(-) create mode 100644 ccm-cms/src/com/arsdigita/cms/RelationAttributeImportTool.java create mode 100644 ccm-cms/src/com/arsdigita/cms/upgrade/RelationAttributeACSObject.java create mode 100644 ccm-sci-bundle/bundles/base/res/bundle/ddenums.xml create mode 100644 ccm-sci-bundle/bundles/demo/res/bundle/ddenums.xml create mode 100644 ccm-sci-bundle/bundles/devel/res/bundle/ddenums.xml create mode 100644 ccm-sci-bundle/bundles/extended/res/bundle/ddenums.xml create mode 100644 ccm-sci-bundle/bundles/standard/res/bundle/ddenums.xml diff --git a/ccm-cms/application.xml b/ccm-cms/application.xml index f362e42cf..015c5077c 100755 --- a/ccm-cms/application.xml +++ b/ccm-cms/application.xml @@ -2,7 +2,7 @@ diff --git a/ccm-cms/pdl/com/arsdigita/content-section/RelationAttribute.pdl b/ccm-cms/pdl/com/arsdigita/content-section/RelationAttribute.pdl index 2b02049c7..7bead87a8 100644 --- a/ccm-cms/pdl/com/arsdigita/content-section/RelationAttribute.pdl +++ b/ccm-cms/pdl/com/arsdigita/content-section/RelationAttribute.pdl @@ -21,9 +21,9 @@ model com.arsdigita.cms; import com.arsdigita.kernel.ACSObject; -object type RelationAttribute { +object type RelationAttribute extends ACSObject { - BigDecimal[1..1] id = cms_relation_attribute.object_id INTEGER; + //BigDecimal[1..1] id = cms_relation_attribute.object_id INTEGER; String[1..1] attribute = cms_relation_attribute.attribute VARCHAR(100); String[1..1] attr_key = cms_relation_attribute.attr_key VARCHAR(100); String[1..1] lang = cms_relation_attribute.lang VARCHAR(2); @@ -31,6 +31,7 @@ object type RelationAttribute { String[0..1] description = cms_relation_attribute.description VARCHAR(500); unique (attribute, attr_key, lang); - object key (id); + //object key (id); + reference key(cms_relation_attribute.object_id); } diff --git a/ccm-cms/src/ccm-cms.upgrade b/ccm-cms/src/ccm-cms.upgrade index ec1366497..68f777d85 100755 --- a/ccm-cms/src/ccm-cms.upgrade +++ b/ccm-cms/src/ccm-cms.upgrade @@ -69,4 +69,8 @@