Hy,
here my problem:
I have 2 entity ("version" and "document") beans with relatations:
one CMR 1 - 1
call by "getVersionPrincipale" in the entity "document"
and call by "getDocumentPrincipale" in the entity "version"
which permit to have the main version of a document
one CMR 1 - *
call by "getVersions" in the entity "document"
and call by "getDocument" in the entity "version"
which permit to have all the version of one document.
so if I select a version (for exemple vbl) of a document (main or not) I can acces to the document by vbl.getDocument(). (or vbl.getDocumentPrincipale() if it's the main version) but vbl.getDocument() should work for both.
the problem is I want to know all version of a document when I know only one version of the document (I can use document.getVersions() for this)
when I access to the document by the main version there are no problems but when I try to get them from an other version I have this error:
15:22:54,895 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.String rastertech.VersionBeanLocal.getNomVersion(), causedBy:
javax.ejb.EJBException: Could not load field value: nomVersion
for example :
VersionBeanLocal vbl=myVersion;
Iterator it=vbl.getDocument().getVersions().iterator();
while(it.hasNext())
{
VersionBeanLocal vbl=(VersionBeanLocal)it.next();
out.println(vbl.getNomVersion());
}
if myVersion is the main version of the document it's ok.
but if is not I have the error.
is there a bug or not ?
I use JBoss 4.0DR3 with My-SQL