Discussion:
[Middlegen-user] Multiple CMR fields of same type gives error in parameterlist in ejbCreate/ejbPostCreate
Asgeir Østerhus
2002-06-24 10:24:02 UTC
Permalink
Hello,

When running middlgen (CVS version from 24.06) it makes the following ejbCreate / ejbPostCreate:


public java.lang.Integer ejbCreate( java.lang.Integer idDqabsextposacc, java.lang.String measname, java.lang.String identcode, java.lang.String measdesc, java.lang.String evalmethdesc, gdkdbtest.ejb.interfaces.EvalmethtypecdObjLocal evalmethtypecdObj, gdkdbtest.ejb.interfaces.CitationObjLocal citationObj, gdkdbtest.ejb.interfaces.CitationObjLocal citationObj, gdkdbtest.ejb.interfaces.DataqualObjLocal dataqualObj ) throws javax.ejb.CreateException {
// Set CMP fields
setIdDqabsextposacc(idDqabsextposacc);
setMeasname(measname);
setIdentcode(identcode);
setMeasdesc(measdesc);
setEvalmethdesc(evalmethdesc);
// EJB 2.0 spec says return null for CMP ejbCreate methods.
return null;
}

public void ejbPostCreate( java.lang.Integer idDqabsextposacc, java.lang.String measname, java.lang.String identcode, java.lang.String measdesc, java.lang.String evalmethdesc, gdkdbtest.ejb.interfaces.EvalmethtypecdObjLocal evalmethtypecdObj, gdkdbtest.ejb.interfaces.CitationObjLocal citationObj, gdkdbtest.ejb.interfaces.CitationObjLocal citationObj, gdkdbtest.ejb.interfaces.DataqualObjLocal dataqualObj ) throws javax.ejb.CreateException {
// Set CMR fields
setEvalmethtypecdObj(evalmethtypecdObj);
setCitationObjByIdentauth(citationObjByIdentauth);
setCitationObjByEvalproc(citationObjByEvalproc);
setDataqualObj(dataqualObj);
}

And since there is multiple parameters named citationObj, and ejbPostCreate thinks they are called citationObjByIdentauth / citationObjByEvalproc this does not work of course.

I guess there is something not quite right about $allCreateSignature in entity-cmp-20.vm.

Any idea about what to do to fix this would be great.

8-)
Asgeir
a***@netcom.no
2002-06-24 11:04:02 UTC
Permalink
It sounds like you have 2 relations between 2 tables, using different
FKs (identauth and evalproc in the citation_obj table perhaps?).

Can you send me a couple of table definitions (sql) that can reproduce
this problem? Then I'll fix it ASAP.

Aslak

----- Original Message -----
From: Asgeir �sterhus <***@commage.no>
Date: Monday, June 24, 2002 2:25 pm
Subject: [Middlegen-user] Multiple CMR fields of same type gives error
in parameterlist in ejbCreate/ejbPostCreate
Post by Asgeir Østerhus
Hello,
When running middlgen (CVS version from 24.06) it makes the
public java.lang.Integer ejbCreate( java.lang.Integer
idDqabsextposacc, java.lang.String measname, java.lang.String
identcode, java.lang.String measdesc, java.lang.String
evalmethdesc, gdkdbtest.ejb.interfaces.EvalmethtypecdObjLocal
evalmethtypecdObj, gdkdbtest.ejb.interfaces.CitationObjLocal
citationObj, gdkdbtest.ejb.interfaces.CitationObjLocal
citationObj, gdkdbtest.ejb.interfaces.DataqualObjLocal dataqualObj
) throws javax.ejb.CreateException {
// Set CMP fields
setIdDqabsextposacc(idDqabsextposacc);
setMeasname(measname);
setIdentcode(identcode);
setMeasdesc(measdesc);
setEvalmethdesc(evalmethdesc);
// EJB 2.0 spec says return null for CMP ejbCreate methods.
return null;
}
public void ejbPostCreate( java.lang.Integer idDqabsextposacc,
java.lang.String measname, java.lang.String identcode,
java.lang.String measdesc, java.lang.String evalmethdesc,
gdkdbtest.ejb.interfaces.EvalmethtypecdObjLocal evalmethtypecdObj,
gdkdbtest.ejb.interfaces.CitationObjLocal citationObj,
gdkdbtest.ejb.interfaces.CitationObjLocal citationObj,
gdkdbtest.ejb.interfaces.DataqualObjLocal dataqualObj ) throws
javax.ejb.CreateException {
// Set CMR fields
setEvalmethtypecdObj(evalmethtypecdObj);
setCitationObjByIdentauth(citationObjByIdentauth);
setCitationObjByEvalproc(citationObjByEvalproc);
setDataqualObj(dataqualObj);
}
And since there is multiple parameters named citationObj, and
ejbPostCreate thinks they are called citationObjByIdentauth /
citationObjByEvalproc this does not work of course.
I guess there is something not quite right about
$allCreateSignature in entity-cmp-20.vm.
Any idea about what to do to fix this would be great.
8-)
Asgeir
a***@netcom.no
2002-06-24 11:56:06 UTC
Permalink
This should fix it:

http://sourceforge.net/tracker/index.php?
func=detail&aid=573116&group_id=36044&atid=415992

I'll commit it in a week or so (or maybe some of the other developers
will), but in the meanwhile you can fix it yourself.

Aslak

----- Original Message -----
From: Asgeir �sterhus <***@commage.no>
Date: Monday, June 24, 2002 2:25 pm
Subject: [Middlegen-user] Multiple CMR fields of same type gives error
in parameterlist in ejbCreate/ejbPostCreate
Post by Asgeir Østerhus
Hello,
When running middlgen (CVS version from 24.06) it makes the
public java.lang.Integer ejbCreate( java.lang.Integer
idDqabsextposacc, java.lang.String measname, java.lang.String
identcode, java.lang.String measdesc, java.lang.String
evalmethdesc, gdkdbtest.ejb.interfaces.EvalmethtypecdObjLocal
evalmethtypecdObj, gdkdbtest.ejb.interfaces.CitationObjLocal
citationObj, gdkdbtest.ejb.interfaces.CitationObjLocal
citationObj, gdkdbtest.ejb.interfaces.DataqualObjLocal dataqualObj
) throws javax.ejb.CreateException {
// Set CMP fields
setIdDqabsextposacc(idDqabsextposacc);
setMeasname(measname);
setIdentcode(identcode);
setMeasdesc(measdesc);
setEvalmethdesc(evalmethdesc);
// EJB 2.0 spec says return null for CMP ejbCreate methods.
return null;
}
public void ejbPostCreate( java.lang.Integer idDqabsextposacc,
java.lang.String measname, java.lang.String identcode,
java.lang.String measdesc, java.lang.String evalmethdesc,
gdkdbtest.ejb.interfaces.EvalmethtypecdObjLocal evalmethtypecdObj,
gdkdbtest.ejb.interfaces.CitationObjLocal citationObj,
gdkdbtest.ejb.interfaces.CitationObjLocal citationObj,
gdkdbtest.ejb.interfaces.DataqualObjLocal dataqualObj ) throws
javax.ejb.CreateException {
// Set CMR fields
setEvalmethtypecdObj(evalmethtypecdObj);
setCitationObjByIdentauth(citationObjByIdentauth);
setCitationObjByEvalproc(citationObjByEvalproc);
setDataqualObj(dataqualObj);
}
And since there is multiple parameters named citationObj, and
ejbPostCreate thinks they are called citationObjByIdentauth /
citationObjByEvalproc this does not work of course.
I guess there is something not quite right about
$allCreateSignature in entity-cmp-20.vm.
Any idea about what to do to fix this would be great.
8-)
Asgeir
Loading...