You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Steve Ruby <st...@rubysolutions.com> on 2001/03/12 01:10:33 UTC

get/setPerm to table lost?


Was this feature of being able to set the column values in
the TURBINE_USER table with setPerm(string,string) lost somewhere
before tdk1a10?

Looking int he source all TurbineSecurity.save(user) is doing is
moving value from the hash of Perm values into the criteria
before doing a TurbineUserPeer.doUpdate(criteria).

Since I can't even do this simple update against the TURBINE_USER
table using peers, I assume something feature was dropped that
made it possible to make direct updates with out modifying the turbine
peers?

This will update EMAIL but will not update any other columns
that were added to the TURBINE_USER table..

TurbineUserPeer.doUpdate(
new Criteria.add("USER_ID",user.getPrimaryKeyAsInt())
.add("EMAIL","value").add("TESTING","blah"));

In other words no problem changing email with that
but it never changes TESTING..
TurbineUserPeer.columnNames indicates that it is seeing
all of the new columns. 

Does TESTING have to be added to the schema some how?

If so maybe tdk should make it possible to update Turbine Peers
off of the turbine-schema.xml, right now it only updates
SQL for the tables.

I could have sworn one of the developers said setPerm shoudl update
TURBINE_USER columns where availabe but that was a while
back and it no longer works..

Was this intentional?

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


Re: get/setPerm to table lost?

Posted by Leon Messerschmidt <le...@opticode.co.za>.
Hi,

If you want to update columns that are not in the standard TURBINE_USER
schema you need to add them to the map-builder.  You need to write your own
MapBuilder that looks like TurbineMapBuilder and make an entry in the
TR.properties to use the new one.

~ Leon

----- Original Message -----
From: "Steve Ruby" <st...@rubysolutions.com>
To: <tu...@jakarta.apache.org>
Sent: Monday, March 12, 2001 2:10 AM
Subject: get/setPerm to table lost?


>
>
> Was this feature of being able to set the column values in
> the TURBINE_USER table with setPerm(string,string) lost somewhere
> before tdk1a10?
>
> Looking int he source all TurbineSecurity.save(user) is doing is
> moving value from the hash of Perm values into the criteria
> before doing a TurbineUserPeer.doUpdate(criteria).
>
> Since I can't even do this simple update against the TURBINE_USER
> table using peers, I assume something feature was dropped that
> made it possible to make direct updates with out modifying the turbine
> peers?
>
> This will update EMAIL but will not update any other columns
> that were added to the TURBINE_USER table..
>
> TurbineUserPeer.doUpdate(
> new Criteria.add("USER_ID",user.getPrimaryKeyAsInt())
> .add("EMAIL","value").add("TESTING","blah"));
>
> In other words no problem changing email with that
> but it never changes TESTING..
> TurbineUserPeer.columnNames indicates that it is seeing
> all of the new columns.
>
> Does TESTING have to be added to the schema some how?
>
> If so maybe tdk should make it possible to update Turbine Peers
> off of the turbine-schema.xml, right now it only updates
> SQL for the tables.
>
> I could have sworn one of the developers said setPerm shoudl update
> TURBINE_USER columns where availabe but that was a while
> back and it no longer works..
>
> Was this intentional?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


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


Re: get/setPerm to table lost?

Posted by John McNally <jm...@collab.net>.
Steve Ruby wrote:
> 

> The short of it... Should I be able to alter column values (columns that
> I add to TURBINE_USER via setPerm without modifying any database maps
> or other tubine code)?
> 

It appears Leon is correct, you will need to add the columns to the
map.  I think Turbine user must have originally contained the
doUpdate/doInsert code so that it was not using BasePeer.  BasePeer
requires complete Maps.

John McNally

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


Re: get/setPerm to table lost?

Posted by John McNally <jm...@collab.net>.
Steve Ruby wrote:
> 
> Was this feature of being able to set the column values in
> the TURBINE_USER table with setPerm(string,string) lost somewhere
> before tdk1a10?
> 
> Looking int he source all TurbineSecurity.save(user) is doing is
> moving value from the hash of Perm values into the criteria
> before doing a TurbineUserPeer.doUpdate(criteria).
> 
> Since I can't even do this simple update against the TURBINE_USER
> table using peers, I assume something feature was dropped that
> made it possible to make direct updates with out modifying the turbine
> peers?
> 
> This will update EMAIL but will not update any other columns
> that were added to the TURBINE_USER table..
> 
> TurbineUserPeer.doUpdate(
> new Criteria.add("USER_ID",user.getPrimaryKeyAsInt())
> .add("EMAIL","value").add("TESTING","blah"));
> 

The above statement should update a row in the database.  It does not
use any special functionality wrt TurbineUser and get/setPerm.  If this
is not working, you need to debug it and then the get/setPerm trickery
is more likely to function.  Try printing out the Criteria.toString, it
will probably contain some irrelevant data as the debugging tries to
show how the Criteria might show up as a query, but may give some
insight.

John McNally

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