Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/08/2002, 04:53
Avatar de Zokor
Zokor
 
Fecha de Ingreso: julio-2002
Mensajes: 167
Antigüedad: 21 años, 10 meses
Puntos: 1
Re: Problema con EJB

Vaya, ya encontré la solución en <a href='ir.asp?http://www.jguru.com' target='_blank'>http://www.jguru.com...</a>. Dice así:

Cita:
How can I update the primary key field in a CMP Entity Bean?
You cannot change the primary key field of an Entity bean. Refer to page 130 of the EJB 2.0 specification, it states &quot;Once the primary key for an entity bean has been set, the Bean Provider must not attempt to change it by use of set accessor methods on the primary key cmp-fields. The Bean provider should therefore not expose the set accessor methods for the primary key cmp-fields in the component interface of the entity bean.&quot;
A work around to update a primary key field, would be to remove and then an re-create the bean.
Gracias de todas formas.
Saludos

<div align="center"><img src="http://www.alu.ua.es/d/dcmc/img/A1202.gif" width="75" height="78">