[JBoss-user] [Persistence CMP/JBoss] - Re: Problem with relation between BMP EJB and CMP EJB

2004-07-06 Thread JBossKiki
Thanks for your response, is there a work around for  this? 
Mike.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3841079#3841079

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3841079


---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Problem with relation between BMP EJB and CMP EJB

2004-07-05 Thread JBossKiki
Hi,
I'm using JBOSS 3.2.3 with Oracle 8i. I've two EJB User and Country, User is a BMP and 
Country a CMP. When I try to deploy I've this error: 
Entity: User not found for relation : User Country.
Code:

  | /**
  | * @ejb.bean 
  | *   name=User 
  | *   type=BMP 
  | *   primkey-field=idUser 
  | *   view-type = local 
  | * 
  | * @ejb.value-object 
  | *   match = * 
  | *   
  | * @ejb.dao 
  | *   class = seryx.dictionnary.bean.bmp.dao.UserDAO 
  | *   impl-class = seryx.dictionnary.bean.bmp.dao.UserDAOImpl
  | * 
  | * @ejb.util
  | *   generate = physical 
  | * 
  | * @ejb.pk 
  | *   generate = false 
  | *   class = java.lang.Long 
  | *   package = java.lang 
  | *   
  | * @jboss.persistence 
  | *   create-table=false 
  | *   remove-table=false 
  | */
  | public abstract class UserEJB implements EntityBean
  | {
  | Long idUser;
  | String login;
  | String password;
  | String email;
  | Long idCountry;
  | Long idState;
  | int standBy;
  | 
  | /**
  | * Returns user's country.
  | * 
  | * @ejb.interface-method
  | *   view-type=local
  | *
  | * @ejb.relation 
  | *   name = User-Country
  | *   role-name = User-has-a-Country
  | *   target-multiple = yes
  | *   target-role-name=Country-has-Users
  | *   target-ejb=Country
  | * 
  | * @jboss.relation 
  | *   fk-column = IdCountry
  | *   related-pk-field = idCountry
  | *   fk-constraint = true
  | * 
  | * @dao.call 
  | *   name = getCountry
  | * 
  | * @return the country.
  | */
  | public abstract CountryLocal getCountry();
  | /**
  | * Sets User's country.
  | * 
  | * @param seryx.dictionnary.bean.cmp.CountryLocal the new Country value
  | * 
  | * @ejb.interface-method 
  | *   view-type = local
  | * 
  | * @dao.call 
  | *   name = setCountry
  | */
  | public abstract void setCountry(UserLocal country);
  | }
  | 
  | /**
  |  * @ejb.bean 
  |  *  name=Country
  |  *  type=CMP
  |  *  primkey-field=idCountry
  |  *  schema=sCountry 
  |  *  cmp-version=2.x
  |  *  view-type = local
  |  * 
  |  * @ejb.persistence
  |  *  table-name=Country
  |  * 
  |  * @ejb.finder
  |  *  view-type=local
  |  *  signature=java.util.Collection findAll()
  |  *  query=SELECT OBJECT(o) FROM sCountry o
  |  * 
  |  * @ejb.value-object
  |  *  name=Country
  |  *  match=*
  |  * 
  |  * @ejb.util
  |  *  generate = physical
  |  * 
  |  * @jboss.persistence 
  |  *  create-table=false 
  |  *  remove-table=false
  |  * 
  |  * @jboss.entity-command 
  |  *  name=CountryPk 
  |  *  class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCOracleCreateCommand
  |  * 
  |  * @jboss.entity-command-attribute 
  |  *  name=sequence
  |  *  value=seq_country_id
  |  * 
  |  */
  | public abstract class CountryEJB implements EntityBean
  | {
  | /**
  |  * The  ejbCreate method.
  |  * 
  |  * @ejb.create-method 
  |  */
  | public java.lang.Long ejbCreate(Long idCountry, String country) throws 
javax.ejb.CreateException
  | {
  | setIdCountry(idCountry);
  | setCountry(country);
  | 
  | return null;
  | }
  | /**
  |  * The container invokes this method immediately after it calls ejbCreate.
  |  * 
  |  */
  | public void ejbPostCreate(Long idCountry, String country) throws 
javax.ejb.CreateException
  | {
  | }
  | /**
  | * Returns the idCountry
  | * @return the idCountry
  | * 
  | * @ejb.persistent-field 
  | * @ejb.persistence
  | *column-name=IdCountry
  | * sql-type=number
  | * @ejb.pk-field 
  | * @ejb.interface-method
  | */
  | public abstract java.lang.Long getIdCountry();
  | /**
  | * Sets the idCountry
  | * 
  | * @param java.lang.Long the new idCountry value
  | * 
  | * @ejb.interface-method
  | */
  | public abstract void setIdCountry(java.lang.Long idCountry);
  | /**
  | * Returns the country
  | * @return the country
  | * 
  | * @ejb.persistent-field 
  | * @ejb.persistence
  | *column-name=Country
  | * sql-type=varchar
  | *  
  | * @ejb.interface-method
  | */
  | public abstract java.lang.String getCountry();
  | /**
  | * Sets the country
  | * 
  | * @param java.lang.String the new country value
  | * 
  | * @ejb.interface-method
  | */
  | public abstract void setCountry(java.lang.String country);
  | /**
  | * @ejb.interface-method
  | *   view-type = local
  | */
  | public abstract CountryValue getCountryValue();
  | /**
  | * Sets the CountryValue
  | * 
  | * @param seryx.dictionnary.bean.cmp.CountryValue the new CountryValue
  | * 
  | * @ejb.interface-method
  | *   view-type = local
  | */
  | public abstract void setCountryValue(CountryValue value);
  | /**