Yea, its since been updated to use the internal object from the key class.
I'm just trying to get the reflections stuff working with the new key stuff
like it used to for the native type keys:

DBObject dbo = new DBObject();
data.getProperties().setProperties(dbo);
... yada yada yada ...

Which is why I updated the Object.vm template of torque to set foreign keys
via a string.  But in hindsite, I think I could just add methods to gets for
all the different key class types into ValueParser.java, then the above
would work with the new key stuff.  Comments?

-----Original Message-----
From: Daniel Rall
To: [EMAIL PROTECTED]
Sent: 2/24/01 4:12 AM
Subject: Re: CVS update: turbine/src/java/org/apache/turbine/om/peer
BasePeer.java

Isn't Village going to quote the value that it's passed when the value
is passed as a String object?  Is this going to work across all
databases?

Java Apache CVS Development <[EMAIL PROTECTED]> writes:

>   User: ekkerbj 
>   Date: 01/02/23 21:10:09
> 
>   Modified:    src/java/org/apache/turbine/om/peer BasePeer.java
>   Log:
>   On inserts or updates, if a column was defined as a key ( ObjectKey,
SimpleKey, or ComboKey ) it was not being set.
>   Added a check to set SimpleKeys via converting the data to strings.
ComboKey objects are still not handled yet.
>   
>   Revision  Changes    Path
>   1.36      +5 -2
turbine/src/java/org/apache/turbine/om/peer/BasePeer.java
>   
>   Index: BasePeer.java
>   ===================================================================
>   RCS file:
/products/cvs/turbine/turbine/src/java/org/apache/turbine/om/peer/BasePe
er.java,v
>   retrieving revision 1.35
>   retrieving revision 1.36
>   diff -u -r1.35 -r1.36
>   --- BasePeer.java   2001/02/22 05:29:21     1.35
>   +++ BasePeer.java   2001/02/24 05:10:08     1.36
>   @@ -86,7 +86,7 @@
>     * @author <a href="mailto:[EMAIL PROTECTED]">Frank Y. Kim</a>
>     * @author <a href="mailto:[EMAIL PROTECTED]">John D.
McNally</a>
>     * @author <a href="mailto:[EMAIL PROTECTED]">Brett McLaughlin</a>
>   - * @version $Id: BasePeer.java,v 1.35 2001/02/22 05:29:21 mcnally
Exp $
>   + * @version $Id: BasePeer.java,v 1.36 2001/02/24 05:10:08 ekkerbj
Exp $
>     */
>    public abstract class BasePeer
>    {
>   @@ -791,9 +791,12 @@
>                    {
>                        rec.setValueNull(colMap.getColumnName());
>                    }    
>   -                else if ( obj instanceof String)
>   +                else if ( obj instanceof String )
>                        rec.setValue( colMap.getColumnName(),
>                                      (String)obj );
>   +                else if ( obj instanceof SimpleKey )
>   +                    rec.setValue( colMap.getColumnName(),
>   +                                  obj.toString() );
>                    else if ( obj instanceof Integer)
>                        rec.setValue( colMap.getColumnName(),
>                                      criteria.getInt(key) );
>   
>   
>   
> 

-- 

Daniel Rall <[EMAIL PROTECTED]>


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]


-----------------------------------------------------------------------

This message has been scanned for viruses with Trend Micro's Interscan VirusWall.


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to