I'm trying to use the alias feature. I have this in my project-schema.xml:

  <table name="TURBINE_USER" idMethod="idbroker"
alias="org.apache.turbine.om.security.TurbineUser">
    <column name="USER_ID" required="true" primaryKey="true" type="INTEGER"/>
  </table>

  <table name="member" idMethod="idbroker">
   <column name="id" type="NUMERIC" size="6" primaryKey="true" required="true"
autoIncrement="true"/>
   <column name="address" type="VARCHAR" size="200" required="true"/>
   <column name="turbine_user_id" type="INTEGER" required="true"/>
   <foreign-key foreignTable="TURBINE_USER">
      <reference local="turbine_user_id" foreign="USER_ID"/>
   </foreign-key>
  </table>

The problem is that new TurbineUser and TurbineUserPeer classes are generated
in the application object model. I could fix this by removing them and adding:

    import org.apache.turbine.om.security.TurbineUser;
    import org.apache.turbine.om.security.TurbineUserPeer;
to BaseMember so that it uses the right TurbineUser.

Is there any way to do this without modifiying the generated code? (Perhaps
I'm not using alias in the right way or am missing some other parameter).

Thanks,
Gabriel

Jon Stevens wrote:

> on 5/30/01 6:35 AM, "Leandro Saad" <[EMAIL PROTECTED]> wrote:
>
> > You have to define a table called TURBINE_USER in the same file you
> > defined
> > IDENTITIES. Just don't use *all* the SQL generated, but only the
> > portions that you are
> > interested in.
>
> Yup. John is working on improving this with the addition of the concept of
> "aliased" tables in the project-schema.xml file.
>
> -jon
>
> --
> If you come from a Perl or PHP background, JSP is a way to take
> your pain to new levels. --Anonymous
> <http://jakarta.apache.org/velocity/ymtd/ymtd.html>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--
Gabriel Moreno
[EMAIL PROTECTED]
MSE Graduate Student
Carnegie Mellon University



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to