Menu

#95 Invalid ejbPostCreate Code For CMR

open
nobody
None
5
2003-04-24
2003-04-24
No

Created table in PostgreSQL 7.2.3 using:
create table diskPart (
id int not null,
disk int not null,
volGroup int null,
devID varchar(16) not null,
sizeMB int not null,

constraint diskPart_pk primary key (id),
constraint diskPart_disk foreign key (disk) references disk (id),
constraint diskPart_vg foreign key (volGroup) references
volGroup (id)
);

(To get the generated classes to compile, I have to adjust the
directionality of ALL 1:n relations so that there is no arrowhead at
the '1' side of the relation. If I don't, XDoclet complains that the
relation appears to be unidirectional since it appears only once. I also
end up with two methods called getXxx with different return types.)

When running Middlegen 2.0b1 on this database, the class selected
for disk is java.lang.Integer. The getDisk and setDisk methods get
declared using java.lang.Integer, as expected. The ejbCreate and
ejbPostCreate methods, however, use the DiskLocal interface as the
parameter type. This causes a compilation error in ejbPostCreate
since there is no setDisk which takes a DiskLocal parameter.

Discussion

  • Anonymous

    Anonymous - 2003-04-24

    Generated DiskPartBean

     
  • Anonymous

    Anonymous - 2003-04-24
    • summary: Invalid ejbCreate Code When Not Generating PK Class --> Invalid ejbPostCreate Code For CMR
     

Log in to post a comment.