You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by peter neubauer <pe...@yahoo.se> on 2002/08/20 20:49:54 UTC

TURBINE_USER 1:1 to custom table?

Hi,
another problem I have is that I don't get a 1:1 mapping between
TurbineUser and my Member class with the following:

  <table name="FOTONYTT_USER" javaName="FotonyttUser"
alias="TurbineUser"
    baseClass="com.techtor.fotonytt.om.TurbineUserAdapter"
    basePeer="com.techtor.fotonytt.om.TurbineUserPeerAdapter">
    <!-- Unique identifier -->
    <column name="USER_ID" primaryKey="true" required="true"
type="INTEGER"/>
  </table>

<table name="MEMBER" idMethod="idbroker">
    <column name="MEMBER_ID" required="true" primaryKey="true"
type="INTEGER"/>
    <column name="USER_ID" type="INTEGER" description=""/>
    <foreign-key foreignTable="FOTONYTT_USER">
      <reference local="USER_ID" foreign="USER_ID"/>
    </foreign-key>
  </table>
  <table name="STATUS" idMethod="idbroker">
    <column name="STATUS_ID" required="true" primaryKey="true"
type="INTEGER"/>
    <column name="DESCRIPTION" size="255" type="VARCHAR"/>
   </table>

What I get is a collection of Members in my BaseFotonyttUser class and a
getFotonyttUser (exactly what I want) in Member. So this is 1:n then.

Inserrting a foreign-key into FOTONYTT_USER results in compiling errors
since there is ni method setMemberId in BaseTurbineUser.

Does anyone know ho to create the 1:1 relationship between the
TURBINE_USER and a custom table?

/peter

_____________________________________________________
Gratis e-mail resten av livet p� www.yahoo.se/mail
Busenkelt!

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>