adding '@ejb.bean primkey-field="id"' to xxxBean *partially* resolved the problem.

the xxxPK is no longer generated and the java.lang.String-based primary key, "id", is being used. however, an error is occuring when the xxxValue object is being generated. the part of xxxValue.java with the error is below:


public void setPrimaryKey( java.lang.String pk )
{
// it's also nice to update PK object - just in case
// somebody would ask for it later...
this.pk = pk;
setId( pk.id ); <-- ** compile error **
}



public void setId( java.lang.String id )
{
this.id = id;
idHasBeenSet = true;

pk.setId(id); <-- ** compile error **
}



it seems like these are occuring because for some reason xdoclet thinks that "pk" is an xxxPK object, when it's really just a java.lang.String.

any ideas why this is happening?

thank you.



At 18:42 02/12/09 +0900, you wrote:
is there a requirement for the generation of xxxValue objects that the pk of "xxx" entity must be xxxPK? in xxxBean, i specified that i wanted to use java.lang.String as a primary key, as follows:



public abstract class BaseEntityBean {

/**
* @ejb.pk-field
* @ejb.interface-method
* @ejb.persistence column-name="id"
*/
public abstract String getId( );

/**
* @ejb.interface-method
*/
public abstract void setId( String id );

}



/**
* @ejb.value-object match="*" name="xxx"
* @ejb.pk generate="false"
*/
public abstract class xxxBean extends BaseEntityBean implements EntityBean {

...
}


but when i do this, i get the following error during compilation:

[javac] xxxValue.java:39: Cannot resolve reference.
[javac] Reference: Class xxxPK
[javac] private xxxPK pk;


apparently, even though i specified that the pk should not be generated (since using java.lang.String), the xxxValue object is still looking for xxxPK.

any suggestions?

thank you.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to