Hi Edson
thanks for your reply. I'm still stuck :-(


Edson Carlos Ericksson Richter wrote:


I've the two situation in my project. I have a documents table table has a
fixed structure to all types of documents, and I have different tables for
different objects, in another (a payment structure).

All that works. I think you must specify that your interfaces extends
others. The java.io.Serializable ins't necessary to work with OJB (but you
may need it to work with another tech).

But see. If you make AbstractPersistentIF extends java.io.Seralizable, all
your interfaces (since they will extends AbstractPersistentIF) will be
subclasses of java.io.Seralizable.

I changed it. No difference!
The problem is, that the proxy-instance get the wrong interfaces for the class in question.
see eclipse "watch-expression" after this code:


[code]:
Criteria crit = new Criteria();
crit.addEqualTo("id", new Integer(pOID));
Query query = new QueryByCriteria(PartnerPO.class, crit);


PartnerIF partner = (PartnerIF)broker.getObjectByQuery(query);

if (broker.hasClassDescriptor(partner.getClass())) {

           tx.lock(partner, org.odmg.Transaction.READ);
       }

[watch-expression]:

Class[] "Class[] test = partner.getClass().getInterfaces();"= Class[4] (id=175)
Class [0]= Class (de.softcon.webcontrol.business.model.PersonIF) (id=106)
Class [1]= Class (de.softcon.webcontrol.business.model.AbstractPersistentIF) (id=94)
Class [2]= Class (java.io.Serializable) (id=95)
Class [3]= Class (de.softcon.webcontrol.business.model.PartnerIF) (id=107)
-----------snip----------


As you can see, the proxy doesn't show the expected interface "OrganisationIF".
(The field "id" has a table-field value of an OrganisationPO (I know this is OK, because
before used proxies, this has been OK)


joerg






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



Reply via email to