Hi there,

I have a class Product (see below) which is is mapped
into a table Product in a SAP-DB database. 

When I execute this query: 

SELECT d from Product d where d._name = 'toto'

I get an

org.exolab.castor.jdo.oql.InvalidCharException

I found out that this is because the attribute '_name'
starts with '_'. If I remove the '_' to the attribute
then the problem will not happen anymore and query
executes well. But I can't
remove the '_' because in fact my java classes are
generated by Source Generator from Castor itself.


Someone suggested to use " instead of ' ("toto"
instead of 'toto') but that did not help because as I
mentioned above the problem I have is related to the
fact that the attribute '_name' starts with '_'.

So, how to query on an attribute that starts with '_'?
any workaround to this? thanks for any clue.

public class Product 
{
        private int       _id;      
        private String    _name;                  
        public int getId()
        {
             ...
        }
        public void setId( int anId )
        {
             ...
        }

        public String getName()
        {                               
             ...
        }

        public void setName( String aName )
        {
             ...
        }
}

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to