Hi ,
My problem is as follow:

I have 2 classes:
User.java has the following attributes :
        ....
        private String name;    
        private UserLogin login;
        ...

and UserLogin.java:
        ...
        private String userLogin;

        public UserLogin(String userLogin){
                this.userLogin = userLogin;
        }
        
        public String getUserLogin(){
                return this.userLogin;
        }
        ...

The database schema is something like this:
        table: user
                name: varchar(50)
                login: varchar(30)
                
The UserLogin class is not persistent( therefore, no table for it ) and the login field in user table must have the result value of  login.getUserLogin() method.

The first field is very easy to map , but how to map the object method login.getUserLogin() to login field in database and vice-versa.

<field name="name" type="string">
    <sql name="name" type="varchar"/>
        <xml node="element" />
</field>
        
<field  name="login" ??????????  THIS IS MY PROBLEM :(

Please help me ...   :-(



Rodrigo Paes
Ci�ncia da Computa��o - UFAL
Messenger - [EMAIL PROTECTED]
ICQ - 85921785

Reply via email to