You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Pierre Henry <ph...@proconcept.ch> on 2003/02/06 18:01:11 UTC

Turbine user management : change database field names

Hi,
I use Jetspeed CVS head with the turbine user management with an Oracle db.
I want to change the table name as well as field names for the TURBINE_USER
etc tables. 

Changing the name of the table is not a big problem : I changed the names
int the build/torque/security-schema.xml, with the javaName attributes so
that the classes still have the same name. 

But changing the field names (for example I want to have PC_TURBINE_USER_ID
instead of USER_ID to conform to our internal standards) causes some static
fields names in the Peer classes, and the Turbine services refer to these
fields. So if the field names change, I can't compile any more ! 

The javaName attribute for the column influences the getXxx method in the
data object , but not the static field name in the Peer object.

Is there a way to generate different static fields name from the column name
? Any idea of how to avoid this problem without rewriting all the Turbine
classes ?

Any suggestion welcome !

Pierre

Re: Turbine user management : change database field names

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Thursday, February 6, 2003, at 09:01  AM, Pierre Henry wrote:

> Hi,
> I use Jetspeed CVS head with the turbine user management with an 
> Oracle db.
> I want to change the table name as well as field names for the 
> TURBINE_USER
> etc tables.
>
> Changing the name of the table is not a big problem : I changed the 
> names
> int the build/torque/security-schema.xml, with the javaName attributes 
> so
> that the classes still have the same name.
>
> But changing the field names (for example I want to have 
> PC_TURBINE_USER_ID
> instead of USER_ID to conform to our internal standards) causes some 
> static
> fields names in the Peer classes, and the Turbine services refer to 
> these
> fields. So if the field names change, I can't compile any more !
>
The USER_ID is hardcoded in the Turbine*Management services.
A recommend patching it by getting the primary key instead.
You could also extend JetspeedUser and override USER_ID, and not make 
it final
Anyway thats a start .... Im sure there will be other minor problems 
but it should be easy enough.
The USER_ID is the primary key, and if you take the approach of 
replacing USER_ID with getPrimaryKey, and send us the patch if it works
You shouldn't have problems with changing the names of the other fields

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org