Hi Diederik,

I need to be able to reference the TurbineUser (and possibly extend it)
table in my other tables so I've tried the following:

1. The Scarab approach using fulcrum:

<table name="TURBINE_USER" javaName="MyUserImpl" alias="TurbineUser" 
    baseClass="org.apache.fulcrum.security.impl.db.entity.TurbineUser"
    basePeer="org.apache.fulcrum.security.impl.db.entity.TurbineUserPeer">
    <column name="USER_ID" primaryKey="true" required="true"
type="INTEGER"/>
</table>

<table name="MY_TABLE" >
    <column name="USER_ID" primaryKey="true" required="true"
type="INTEGER"/>
    <column name="my_column" primaryKey="true" required="true"
type="TIMESTAMP"/>

    <foreign-key foreignTable="TURBINE_USER">
        <reference local="USER_ID" foreign="USER_ID"/>
    </foreign-key>
</table>


Torque created all the OM objects and everything compile correctly!

I then commented out the security service entries in my tr.props and enabled
them in Fulcrum.properties
making reference to MyUserImpl and MyUserImplPeer where appropriate...

When I tried to access http://localhost:8080/secur/servlet/secur I got a
horrible exception complaining that Turbine (the turbine broker service)
could not find the security service.

Question 1: I was under the impression that commenting out services in
tr.props and uncommenting them in fulcrum.properties enabled the fulcrum
services rather than the turbine services, is this wrong?
Question 2: What's the equivalent of the MapBrokerService and the
PoolBrokerService in Fulcrum, or do we still need them in tdk-2.2.b1?

Question 3: I noticed in scarab's tr.props that there was a fulcrum database
service but I can't find this in tdk-2.2-b. 

Note:scarab is an excellant guide but as it uses turbine 3 it's a pain to
figure out what is applicable to turbine 2.x and what is not!


As you can see, There are various questions that I need clearing up as
regards the change over to using fulcrum (it's not as simple as changing the
import statements)

After this first attempt I then decided to revert to using turbines security
service:

<table name="TURBINE_USER" javaName="MyUserImpl" alias="TurbineUser" 
    baseClass="org.apache.turbine.om.security.TurbineUser"
    basePeer="org.apache.turbine.om.security.peer.TurbineUserPeer">
    <column name="USER_ID" primaryKey="true" required="true"
type="INTEGER"/>
</table>

<table name="MY_TABLE" >
    <column name="USER_ID" primaryKey="true" required="true"
type="INTEGER"/>
    <column name="my_column" primaryKey="true" required="true"
type="TIMESTAMP"/>

    <foreign-key foreignTable="TURBINE_USER">
        <reference local="USER_ID" foreign="USER_ID"/>
    </foreign-key>
</table>

Torque created all the om code but I got many compilation errors complaining
about not find methods in TurbineUser/Peer etc...

I didn't write any adapters as per the extended-users howto because i wasn't
extending the user-table (for the moment), I just wanted to reference it in
my other tables. 

Question 4: Do I still need to write adapters in 2.2-b1 (You mention that
this is not necessary)?
Question 5: What services in turbine are redundant if fulcrum is used?
Question 6: Could somebody clear up this mess I've gotten into ;)?


I appreciate any advice you or others can offer.

Saimon



> -----Mensaje original-----
> De:   Diederik de Groot [SMTP:[EMAIL PROTECTED]]
> Enviado el:   jueves 21 de marzo de 2002 20:02
> Para: Turbine Users List
> Asunto:       RE: Extending TurbineUser in TDK 2.2b1
> 
> 
> >Hi Cameron,
> 
> >You might have seen that i too have been stuggling under the previous
> >version to extend the User. I had everything working fine until 2.2b1
> came
> >about. I found you van at least do without the TurbineUserAdapters now
> >because you can directly access the extended TurbineUsers. That is what i
> >have done at least. I need the Aliased table only for refering to
> >foreignkeys. I know it's not a good solution but it works for me.
> 
> >I'm not a hunderd percent sure this is the way it was meant to be but it
> >seems to work fine.
> >Just Change everything over to torque where criteria are involved and you
> >seem to be fine.
> >I can't answer your actually question about things being in flux at the
> >moment. Let's see what the creators say :-)
> >Lots of success,
> 
> >Diederik de Groot
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Cameron Cole
> > Sent: donderdag 21 maart 2002 19:26
> > To: Turbine Users List
> > Subject: Extending TurbineUser in TDK 2.2b1
> >
> >
> > Hello again everyone,
> >
> > Previously with version 2.1 I successfully extended TurbineUser but ran
> > into some difficulty when attempting to add a foreign key to my extended
> > user so I could place them on teams. I decided to put the project aside
> > for a bit and return when 2.2b1 came out. Well 2.2b1 has come out
> > (Congrats btw! :) and I have again started to revisit the problem and
> > have run into a few interesting issues. TurbineUserPeer extends the
> > org.apache.turbine.om.peer.BasePeer where as all of my om objects
> > (including the ExtendedBaseUser) extend the torque.util.BasePeer. As
> > such when I attempt to compile my ExtendedBasePeer all of the
> > doSelect(Criteria, DBConnection) methods no longer compile b/c the
> > turbine BasePeer expects a turbine Criteria and my generated
> > BaseUserPeer is passing a torque criteria. This is also true of the
> > retrieveByPK methods.
> >
> > I have two main questions:
> >
> > 1. Is the user/security system in a state of flux and should I just
> > holdoff? If so, where can I get more information? (I have read the
> > archives, but haven't seen any conclusions as yet)
> >
> > 2. Is there another/better way I could go about this? If there is a
> > newer/better way to do this, and someone can kick me in the right
> > direction I'll try to document my trials and tribulations and see if it
> > makes a reasonable how-to... (or how-not-to :) I understand from the
> > archives and current mail threads that the security system is undergoing
> > review and rewrite, but I don't know where to get more information...
> >
> > Thanks,
> >
> > -cam.
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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

Reply via email to