Sorry, just reread your email.

Yes, you do need to define a mapping ( a class-descriptor) for the RegisterForm class.

Regrads,
Raymond Barlow

Alen Ribic wrote:

Hi again

I have sent an email already and got a good reply, but now I have an issue
with mapping side.

I have got classes as follows:

// JavaBean
public class User extends ValidatorForm {}

// Struts form bean
public class RegisterForm extends User {}

Now I just need OJB to recognize RegisteForm class as a User.

usr = request.getAttribute("registerForm"); // returns RegisteForm instance
broker.store(usr);

So now, OJB on store(...) should look at mapping for User class to User
table.

 <class-descriptor
     class="za.co.alen.jfaq.User"
     table="User"
  >
     <extent-class class-ref="za.co.alen.struts.RegisterForm" />
     <!-- field mappings -->
     ...
  </class-descriptor>

I presume that now I need a <class-descriptor/> for the RegisterForm class.
Is this correct?
I looked at the Article example but I just can't get my one to work.

My app still says that OJB cannot recognize RegisterForm class in
repository.

What am I doing wrong and how can I go about doing this correctly.

Thanks

--Alen



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- Regards, Raymond Barlow



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to