Return-Path: Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 95831 invoked by uid 500); 18 Apr 2003 11:20:39 -0000 Received: (qmail 95828 invoked from network); 18 Apr 2003 11:20:39 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 18 Apr 2003 11:20:39 -0000 Received: (qmail 4450 invoked by uid 1524); 18 Apr 2003 11:20:38 -0000 Date: 18 Apr 2003 11:20:38 -0000 Message-ID: <20030418112038.4449.qmail@icarus.apache.org> From: thma@apache.org To: db-ojb-cvs@apache.org Subject: cvs commit: db-ojb/xdocs faq.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N thma 2003/04/18 04:20:38 Modified: xdocs faq.xml Log: add entry for how to map a list of strings Revision Changes Path 1.16 +28 -0 db-ojb/xdocs/faq.xml Index: faq.xml =================================================================== RCS file: /home/cvs/db-ojb/xdocs/faq.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- faq.xml 5 Mar 2003 21:22:08 -0000 1.15 +++ faq.xml 18 Apr 2003 11:20:38 -0000 1.16 @@ -64,6 +64,7 @@
  • Per thread metadata changes at runtime?
  • Is it possible to use OJB within EJB's?
  • Can OJB handle ternary (or higher) associations?
  • +
  • How to map a list of Strings
  • @@ -1101,6 +1102,33 @@ + + You can not map a list of Strings with a collection descriptor. A collection + descriptor can only be used if the element class is a persistent class too. + But element-class-ref="java.lang.String" won't work, because it's no + persistent entity class! +
    + Follow these steps to provide a mapping for an attribute holding alist of Strings. + Let's assume your persistent class has an attribute listOfStrings + holding a list of Strings: + + + The database table mapped to the persistent class has a colum LIST_OF_STRINGS of type + VARCHAR that is used to hold all strings. + + +]]> + + +