// // Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: Article.pdl 287 2005-02-22 00:29:02Z sskracic $ // $DateTime: 2004/08/17 23:15:09 $ model com.arsdigita.cms; import com.arsdigita.kernel.*; object type Article extends TextPage { reference key (cms_articles.article_id); } association { component ArticleImageAssociation[0..n] imageCaptions = join cms_articles.article_id to cms_article_image_map.article_id; Article[1..1] captionArticle = join cms_article_image_map.article_id to cms_articles.article_id; } object type ArticleImageAssociation extends ContentItem { String[0..1] caption = cms_article_image_map.caption VARCHAR(4000); // Only including these ID attributes for legacy purposes BigDecimal[0..1] articleId = cms_article_image_map.article_id INTEGER; BigDecimal[0..1] imageId = cms_article_image_map.image_id INTEGER; composite ReusableImageAsset[0..1] imageAsset = join cms_article_image_map.image_id to cms_images.image_id; reference key (cms_article_image_map.map_id); }