db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joose Vettenranta (JIRA)" <j...@apache.org>
Subject [jira] Created: (OJB-69) collection-descriptor should have option to define which key is to be used when creating collection
Date Sat, 27 Aug 2005 11:36:04 GMT
collection-descriptor should have option to define which key is to be used when creating collection
---------------------------------------------------------------------------------------------------

         Key: OJB-69
         URL: http://issues.apache.org/jira/browse/OJB-69
     Project: OJB
        Type: Improvement
  Components: PB-API  
 Environment: ojb 1.0.1
 Reporter: Joose Vettenranta


if class has 2 primary keys or index keys / id fields, then it is not possible to define to
collections which id field to be used.

Like if I have 2 id's running, one is unique for that class and another one is unique to all
classes, say like this:

A.class { id, gid }
B.class { id, gid }
C.class {id, gid}

could be like: A {1,1}, A{ 2,2}, B{1,3}, A{3,4}, B{2,5}, C{1,6} ...

in repository.xml

<collection-descriptor name="childrens" element-class-ref="net.vettenranta.Children">
  <inverse-foreignkey field-ref="parent_id"/>
  <!--- proposed tag -->
  <foreignkey field-ref="id" />
 </collection-descriptor>

<collection-descriptor name="globalChilds" element-class-ref="net.vettenranta.GlobalChildren">
  <inverse-foreignkey field-ref="global_id"/>
  <!--- proposed tag -->
  <foreignkey field-ref="global_id" />
 </collection-descriptor>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message