|
Hi, I am not sure if this is a bug or whether I am doing
something wrong! Basically I�m trying to create an
entity bean as follows: /** �* @ejb:bean name="Base" �*��������� jndi-name="ejb/ecos/BaseBean" �*� local-jndi-name="ejb/ecos/LocalBaseBean" �* �������� view-type="local" �*��������� type="CMP" �* �������� cmp-version="2.x" �* �������� primkey-field="id" �* �* @ejb.value-object �*�� name="Base" �*�� match="*" **/ public abstract
class BaseBean implements EntityBean
{ �� /** ���� * @ejb.pk-field ���� * @ejb.persistent-field ���� * @ejb.persistence ���� *��� column-name="id" ���� *���
sql-type="INTEGER" ����
* @struts.form-field ����
*��� form-name="id" ���� * @ejb.value-object ���� *��� match="normal" ���� */ ��� public
abstract Integer getId(); For some reason though there appears to be an error in the
value object: �� private
java.lang.Integer id; �� private
boolean idHasBeenSet =
false; �� private
com.primstec.ecos.base.beans.BasePK pk; �� public
BaseValue() �� { ����������� �// Initialize all aggregates (non-collection)
to contain a not null object �� } �� public
BaseValue( java.lang.Integer
id ) �� { ����������� � this.id = id; ����������� � idHasBeenSet
= true; ����������� � pk
= this.getId(); �� } �� //TODO Cloneable is better than this ! �� public
BaseValue( BaseValue otherValue ) �� { ����������� � this.id = otherValue.id; ����������� � idHasBeenSet
= true; ����������� � pk
= this.getId(); �� } The above is wrong because pk
cannot be set to id which is an Integer!! Has anyone else had this problem?� Is there an easy way to solve this?� I�ve searched the
archive and haven�t found an answer to this. Any help would be appreciated.� Thanks. Michael |
