on 9/7/01 10:24 AM, "Atul Dambalkar" <[EMAIL PROTECTED]> wrote:

> I am getting little confused about "extending-user" and "referencing-user
> as a foreign key"...I guess, what we want to do here is just use
> TURBINE_USER table as a foreign table and use it's USER_ID as foreign
> key.  We don't want to override TURBIE_USER table with JETSPEED_USER_PROFILE.

Why not? Don't you want to simply extend Turbine's User/ACL system instead
of inventing your own?

> I have created new schema, please review it. I am a bit skeptical about
> it's correctness, in using TURBINE_USER.USER_ID as foreign key... For the
> given schema, I generated Torque OR classes, and it also generated classes
> for TurbineUser, TurbineRole, TurbineGroup, which I don't think are needed
> as, I guess, I would be really using Turbine API TurbineUser/Role/Group
> classes.

You really need to look at the document I pointed out earlier as well as
Scarab's way of doing things.

>  <table name="JETSPEED_GROUP_PROFILE">
> 
>    <column name="PSML_ID" required="true" primaryKey="true" type="INTEGER"/>
>    <column name="GROUP_NAME" required="true" size="99" type="VARCHAR"/>
>    <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
>    <column name="LANGUAGE" size="2" type="VARCHAR"/>
>    <column name="COUNTRY" size="2" type="VARCHAR"/>
>    <column name="PAGE" size="99" type="VARCHAR"/>
>    <column name="PROFILE" required="true" type="VARBINARY"/>
> 
>    <foreign-key foreignTable="TURBINE_GROUP">
>      <reference local="PSML_ID" foreign="GROUP_ID" />
>    </foreign-key>
> 
>    <index name="JETSPEED_GROUP_PROFILE_INDEX">
>      <index-column name="GROUP_NAME" />
>      <index-column name="MEDIA_TYPE" />
>      <index-column name="LANGUAGE" />
>      <index-column name="COUNTRY" />
>      <index-column name="PAGE" />
>    </index>
> 
>  </table>

What is the point of this table and its columns?

>  <table name="JETSPEED_ROLE_PROFILE">
> 
>    <column name="PSML_ID" required="true" primaryKey="true" type="INTEGER"/>
>    <column name="ROLE_NAME" required="true" size="99" type="VARCHAR"/>
>    <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
>    <column name="LANGUAGE" size="2" type="VARCHAR"/>
>    <column name="COUNTRY" size="2" type="VARCHAR"/>
>    <column name="PAGE" size="99" type="VARCHAR"/>
>    <column name="PROFILE" required="true" type="VARBINARY"/>
> 
>    <foreign-key foreignTable="TURBINE_ROLE">
>      <reference local="PSML_ID" foreign="ROLE_ID" />
>    </foreign-key>
> 
>    <index name="JETSPEED_ROLE_PROFILE_INDEX">
>      <index-column name="ROLE_NAME" />
>      <index-column name="MEDIA_TYPE" />
>      <index-column name="LANGUAGE" />
>      <index-column name="COUNTRY" />
>      <index-column name="PAGE" />
>    </index>
> 
>  </table>

What is the point of this table and its columns?

Do you understand what a Group and what a Role/Permission is?

>  <table name="TURBINE_USER" alias="TurbineUser" >
> 
>    <column name="USER_ID" primaryKey="true" required="true" type="INTEGER"/>
> 
>  </table>
> 
>  <table name="TURBINE_ROLE" alias="TurbineRole" >
> 
>    <column name="ROLE_ID" primaryKey="true" required="true" type="INTEGER"/>
> 
>  </table>
> 
>  <table name="TURBINE_GROUP" alias="TurbineGroup" >
> 
>    <column name="GROUP_ID" primaryKey="true" required="true" type="INTEGER"/>
> 
>  </table>

Why are these defined here?

> ====================================================================
> 
> I couldn't find meaningful documentation about "alias" attribute. I just
> figured out that if "alias" is used, then Torque doesn't generate SQL for
> creating database table. But it created TurbineUser/Role/Group classes and
> peer classes in the generated Java code, which made me think, as to why are
> those needed?

You defined them, it is going to create them.

-jon


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

Reply via email to