<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: EJB m:n relationship in JBoss + Xdoclet</title>
	<atom:link href="http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ejb-mn-relationship-in-jboss-xdoclet</link>
	<description></description>
	<lastBuildDate>Fri, 12 Apr 2013 10:04:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Credit Monitoring Services</title>
		<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/#comment-424</link>
		<dc:creator>Credit Monitoring Services</dc:creator>
		<pubDate>Sat, 28 Apr 2007 04:37:40 +0000</pubDate>
		<guid isPermaLink="false">/?p=98#comment-424</guid>
		<description><![CDATA[&lt;strong&gt;Credit Monitoring Services&lt;/strong&gt;

I dont believe it. Where is the proof?]]></description>
		<content:encoded><![CDATA[<p><strong>Credit Monitoring Services</strong></p>
<p>I dont believe it. Where is the proof?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Student Credit Cards</title>
		<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/#comment-423</link>
		<dc:creator>Student Credit Cards</dc:creator>
		<pubDate>Thu, 26 Apr 2007 20:26:14 +0000</pubDate>
		<guid isPermaLink="false">/?p=98#comment-423</guid>
		<description><![CDATA[&lt;strong&gt;Student Credit Cards&lt;/strong&gt;

Are you sure?]]></description>
		<content:encoded><![CDATA[<p><strong>Student Credit Cards</strong></p>
<p>Are you sure?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: File Cabinets</title>
		<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/#comment-422</link>
		<dc:creator>File Cabinets</dc:creator>
		<pubDate>Tue, 24 Apr 2007 17:47:22 +0000</pubDate>
		<guid isPermaLink="false">/?p=98#comment-422</guid>
		<description><![CDATA[&lt;strong&gt;File Cabinets&lt;/strong&gt;

Excellent idea. I will try it.]]></description>
		<content:encoded><![CDATA[<p><strong>File Cabinets</strong></p>
<p>Excellent idea. I will try it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Furniture Guys</title>
		<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/#comment-421</link>
		<dc:creator>Furniture Guys</dc:creator>
		<pubDate>Sun, 22 Apr 2007 07:21:51 +0000</pubDate>
		<guid isPermaLink="false">/?p=98#comment-421</guid>
		<description><![CDATA[&lt;strong&gt;Furniture Guys&lt;/strong&gt;

Are you sure of that?]]></description>
		<content:encoded><![CDATA[<p><strong>Furniture Guys</strong></p>
<p>Are you sure of that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Lim</title>
		<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/#comment-420</link>
		<dc:creator>John Lim</dc:creator>
		<pubDate>Tue, 03 Jan 2006 03:37:57 +0000</pubDate>
		<guid isPermaLink="false">/?p=98#comment-420</guid>
		<description><![CDATA[I&#039;ve been trying to deploy a one to many relationship for two whole, I mean WHOLE days. ( I have to admit I did sleep), but no luck. Here is my code. I would appreciate your help.

I&#039;m using the current maxdb, jboss-3.2.1. I&#039;m sure I am doing something really wrong that is not obvious to me. One of the things that I noticed is that ejb-jar.xml does not have the key-field auto generated.

/*
 * Created on Dec 29, 2005
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package ejb;

import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import java.util.Collection;



/**
 * @ejb.bean name=&quot;A&quot;
 *	jndi-name=&quot;ABean&quot;
 *	type=&quot;CMP&quot;
 *  primkey-field=&quot;a_id&quot;
  *  schema=&quot;a&quot;
 *  cmp-version=&quot;2.x&quot;
 *
 *--
 * This is needed for JOnAS.
 * If you are not using JOnAS you can safely remove the tags below.
 * @jonas.bean ejb-name=&quot;A&quot;
 *	jndi-name=&quot;ABean&quot;
 * @jonas.jdbc-mapping  jndi-name=&quot;java:/SapdbDS&quot; jdbc-table-name=&quot;a&quot;
 * --
 *
 *  @ejb.persistence
 *   table-name=&quot;a&quot;
 *
 * @ejb.finder
 *    query=&quot;SELECT OBJECT(a) FROM a as a&quot;
 *    signature=&quot;java.util.Collection findAll()&quot;

 *--
 * This is needed for JOnAS.
 * If you are not using JOnAS you can safely remove the tags below.
 * @jonas.finder-method-jdbc-mapping  method-name=&quot;findAll&quot;
 *	jdbc-where-clause=&quot;&quot;
 * @jonas.jdbc-mapping  jndi-name=&quot;java:/SapdbDS&quot;
 *	jdbc-table-name=&quot;a&quot;
 *
 *--
 *
 **/

public abstract class ABean implements EntityBean {
	protected EntityContext ctx = null;


	// business methods
/*	public void addB() {

		BLocal b = null;

		try {
			InitialContext BContext = new InitialContext( );
			BLocalHome bHome =  (BLocalHome)
			  BContext.lookup(&quot;java:comp/env/ejb/B&quot;);
			b = bHome.create(getId());
		} catch (Exception e) {
			System.out.println(&quot;exception @ BContext&quot;);
		}

		Collection bCollection = this.getBBean( );
		bCollection.add(b);

	}
*/
	/**
	 * CMR Collection containing bbean information
	 *
	 * @ return the bbean
	 *
	 *
	 * @ejb.interface-method
	 *
	 * @ejb.relation
	 * 	name=&quot;a-refers-to-b&quot;
	 * 	role-name=&quot;aTob&quot;
	 *		target-ejb=&quot;B&quot;
	 *		target-role-name=&quot;bToa&quot;
	 *
	 * @jboss.relation-mapping
	 * 	style=&quot;relation-table&quot;
	 *
	 * @jboss.relation-table
	 * 	table-name=&quot;b&quot;
	 *		create-table=&quot;false&quot;
	 *		remove-table=&quot;false&quot;
	 *
	 *@jboss.relation
	 *		related-pk-field=&quot;b_id&quot;
	 *		fk-column=&quot;a_id_fk&quot;
	 *		fk-constraint=&quot;false&quot;
	 */

	public abstract Collection getBidfk();

	/**
	 *
	 * @param java.util.Set the new b_id_fk value
	 *
	 * @ejb.interface-method
	 *
	 *
	 */

	public abstract void setBidfk(Collection b);





	public void setEntityContext(EntityContext ctx) {
		this.ctx = ctx;
	}

	public void unsetEntityContext() {
		this.ctx = null;
	}

	/**
	 * The  ejbCreate method.
	 *
	 * @ejb.create-method
	 */
	public java.lang.Long ejbCreate(Collection b) throws javax.ejb.CreateException {

		setAid(new Long(0));

		try {
			BLocalHome bLocalHome = BUtil.getLocalHome();

			java.util.Iterator it = b.iterator();
			while (it.hasNext()) {
				bLocalHome.create(getAid());
			}
		} catch (Exception e) {
			System.out.println(&quot;a.ejbCreate&quot;);
			System.out.println(e.getStackTrace());
		}

		return null;
	}

	/**
	 * The container invokes this method immediately after it calls ejbCreate.
	 *
	 */
	public void ejbPostCreate(Collection b) throws javax.ejb.CreateException {

		try {
			BLocalHome bLocalHome = BUtil.getLocalHome();
			setBidfk(bLocalHome.findByForeignKey(getAid()));
		} catch (Exception e) {
			System.out.println(&quot;a.ejbPostCreate&quot;);
			System.out.println(e.getStackTrace());
		}

	}

	/**
	* Returns the a_id
	* @return the a_id
	*
	* @ejb.persistent-field
	* @ejb.persistence
	*    column-name=&quot;a_id&quot;
	*     sql-type=&quot;fixed(10)&quot;
	* @ejb.pk-field
	* @ejb.interface-method
	*
	* --
	* This is needed for JOnAS.
	* If you are not using JOnAS you can safely remove the tags below.
	* @jonas.cmp-field-jdbc-mapping  field-name=&quot;a_id&quot;
	*	jdbc-field-name=&quot;a_id&quot;
	*
	--
	*/
	public abstract java.lang.Long getA_id();

	/**
	* Sets the a_id
	*
	* @param java.lang.Long the new a_id value
	*
	* @ejb.interface-method
	*/
	public abstract void setA_id(java.lang.Long a_id);

}


/*
 * Created on Dec 29, 2005
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package ejb;

import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import java.lang.Long;


/**
 * @ejb.bean name=&quot;B&quot;
 *	jndi-name=&quot;BBean&quot;
 *	type=&quot;CMP&quot;
 *  primkey-field=&quot;b_id&quot;
  *  schema=&quot;b&quot;
 *  cmp-version=&quot;2.x&quot;
 *
 *--
 * This is needed for JOnAS.
 * If you are not using JOnAS you can safely remove the tags below.
 * @jonas.bean ejb-name=&quot;B&quot;
 *	jndi-name=&quot;BBean&quot;
 * @jonas.jdbc-mapping  jndi-name=&quot;java:/SapdbDS&quot; jdbc-table-name=&quot;b&quot;
 * --
 *
 *  @ejb.persistence
 *   table-name=&quot;b&quot;
 *
 * @ejb.finder
 *    query=&quot;SELECT OBJECT(a) FROM b as a&quot;
 *    signature=&quot;java.util.Collection findAll()&quot;
 *
  * @ejb.finder
 * 	query=&quot;SELECT OBJECT(a) FROM a as a WHERE a_id_fk=?1&quot;
 * 	signature=&quot;java.util.Collection findByForeignKey(java.lang.Long a)&quot;
 *--
 * This is needed for JOnAS.
 * If you are not using JOnAS you can safely remove the tags below.
 * @jonas.finder-method-jdbc-mapping  method-name=&quot;findAll&quot;
 *	jdbc-where-clause=&quot;&quot;
 * @jonas.jdbc-mapping  jndi-name=&quot;java:/SapdbDS&quot;
 *	jdbc-table-name=&quot;b&quot;
 *
 *--
 *
 **/

public abstract class BBean implements EntityBean {

/*	public abstract ALocal getABean();

	public abstract void setABean(ALocal abean);

*/
	protected EntityContext ctx = null;

	public void setEntityContext(EntityContext ctx) {
		this.ctx = ctx;
	}

	public void unsetEntityContext() {
		this.ctx = null;
	}

	/**
	 * The  ejbCreate method.
	 *
	 * @ejb.create-method
	 */
	public java.lang.Long ejbCreate(Long a_id_fk) throws javax.ejb.CreateException {

		setB_id(new Long(0));
		setAidfk(a_id_fk);

		return null;
	}

	/**
	 * The container invokes this method immediately after it calls ejbCreate.
	 *
	 */
	public void ejbPostCreate() throws javax.ejb.CreateException {
	}

	/**
	* Returns the b_id
	* @return the b_id
	*
	* @ejb.persistent-field
	* @ejb.persistence
	*    column-name=&quot;b_id&quot;
	*     sql-type=&quot;fixed(10)&quot;
	* @ejb.pk-field
	* @ejb.interface-method
	*
	* --
	* This is needed for JOnAS.
	* If you are not using JOnAS you can safely remove the tags below.
	* @jonas.cmp-field-jdbc-mapping  field-name=&quot;b_id&quot;
	*	jdbc-field-name=&quot;b_id&quot;
	*
	--
	*/
	public abstract java.lang.Long getB_id();

	/**
	* Sets the b_id
	*
	* @param java.lang.Long the new b_id value
	*
	* @ejb.interface-method
	*/
	public abstract void setB_id(java.lang.Long b_id);

	/**
	* Returns the a_id_fk
	* @return the a_id_fk
	*
	* @ejb.persistent-field
	* @ejb.persistence
	*    column-name=&quot;a_id_fk&quot;
	*     sql-type=&quot;fixed(10)&quot;
	*
	* @ejb.interface-method
	*
	* --
	* This is needed for JOnAS.
	* If you are not using JOnAS you can safely remove the tags below.
	* @jonas.cmp-field-jdbc-mapping  field-name=&quot;a_id_fk&quot;
	*	jdbc-field-name=&quot;a_id_fk&quot;
	*
	--
	*/
	public abstract java.lang.Long getAidfk();

	/**
	* Sets the a_id_fk
	*
	* @param java.lang.Long the new a_id_fk value
	*
	* @ejb.interface-method
	*/
	public abstract void setAidfk(java.lang.Long aidfk);

}








   Generated by XDoclet




      markup for those beans.
     --&gt;





         B

         ejb.BHome
         ejb.B
         ejb.BLocalHome
         ejb.BLocal

         ejb.BCMP
         Container
         java.lang.Long
         False
         2.x
         b


            b_id



            aidfk

         b_id



               findAll







               findByForeignKey

                  java.lang.Long










         A

         ejb.AHome
         ejb.A
         ejb.ALocalHome
         ejb.ALocal

         ejb.ACMP
         Container
         java.lang.Long
         False
         2.x
         a


            a_id

         a_id



               findAll








      markup for those beans.
     --&gt;


      markup for those beans.
     --&gt;






         a-refers-to-b


            aTob
            One

               A


               bidfk
               java.util.Collection




            bToa

            Many

               B








      markup.
     --&gt;]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve been trying to deploy a one to many relationship for two whole, I mean WHOLE days. ( I have to admit I did sleep), but no luck. Here is my code. I would appreciate your help.</p>
<p>I&#8217;m using the current maxdb, jboss-3.2.1. I&#8217;m sure I am doing something really wrong that is not obvious to me. One of the things that I noticed is that ejb-jar.xml does not have the key-field auto generated.</p>
<p>/*<br />
 * Created on Dec 29, 2005<br />
 *<br />
 * To change the template for this generated file go to<br />
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments<br />
 */<br />
package ejb;</p>
<p>import javax.ejb.EntityBean;<br />
import javax.ejb.EntityContext;<br />
import java.util.Collection;</p>
<p>/**<br />
 * @ejb.bean name=&#8221;A&#8221;<br />
 *	jndi-name=&#8221;ABean&#8221;<br />
 *	type=&#8221;CMP&#8221;<br />
 *  primkey-field=&#8221;a_id&#8221;<br />
  *  schema=&#8221;a&#8221;<br />
 *  cmp-version=&#8221;2.x&#8221;<br />
 *<br />
 *&#8211;<br />
 * This is needed for JOnAS.<br />
 * If you are not using JOnAS you can safely remove the tags below.<br />
 * @jonas.bean ejb-name=&#8221;A&#8221;<br />
 *	jndi-name=&#8221;ABean&#8221;<br />
 * @jonas.jdbc-mapping  jndi-name=&#8221;java:/SapdbDS&#8221; jdbc-table-name=&#8221;a&#8221;<br />
 * &#8211;<br />
 *<br />
 *  @ejb.persistence<br />
 *   table-name=&#8221;a&#8221;<br />
 *<br />
 * @ejb.finder<br />
 *    query=&#8221;SELECT OBJECT(a) FROM a as a&#8221;<br />
 *    signature=&#8221;java.util.Collection findAll()&#8221;</p>
<p> *&#8211;<br />
 * This is needed for JOnAS.<br />
 * If you are not using JOnAS you can safely remove the tags below.<br />
 * @jonas.finder-method-jdbc-mapping  method-name=&#8221;findAll&#8221;<br />
 *	jdbc-where-clause=&#8221;"<br />
 * @jonas.jdbc-mapping  jndi-name=&#8221;java:/SapdbDS&#8221;<br />
 *	jdbc-table-name=&#8221;a&#8221;<br />
 *<br />
 *&#8211;<br />
 *<br />
 **/</p>
<p>public abstract class ABean implements EntityBean {<br />
	protected EntityContext ctx = null;</p>
<p>	// business methods<br />
/*	public void addB() {</p>
<p>		BLocal b = null;</p>
<p>		try {<br />
			InitialContext BContext = new InitialContext( );<br />
			BLocalHome bHome =  (BLocalHome)<br />
			  BContext.lookup(&#8220;java:comp/env/ejb/B&#8221;);<br />
			b = bHome.create(getId());<br />
		} catch (Exception e) {<br />
			System.out.println(&#8220;exception @ BContext&#8221;);<br />
		}</p>
<p>		Collection bCollection = this.getBBean( );<br />
		bCollection.add(b);</p>
<p>	}<br />
*/<br />
	/**<br />
	 * CMR Collection containing bbean information<br />
	 *<br />
	 * @ return the bbean<br />
	 *<br />
	 *<br />
	 * @ejb.interface-method<br />
	 *<br />
	 * @ejb.relation<br />
	 * 	name=&#8221;a-refers-to-b&#8221;<br />
	 * 	role-name=&#8221;aTob&#8221;<br />
	 *		target-ejb=&#8221;B&#8221;<br />
	 *		target-role-name=&#8221;bToa&#8221;<br />
	 *<br />
	 * @jboss.relation-mapping<br />
	 * 	style=&#8221;relation-table&#8221;<br />
	 *<br />
	 * @jboss.relation-table<br />
	 * 	table-name=&#8221;b&#8221;<br />
	 *		create-table=&#8221;false&#8221;<br />
	 *		remove-table=&#8221;false&#8221;<br />
	 *<br />
	 *@jboss.relation<br />
	 *		related-pk-field=&#8221;b_id&#8221;<br />
	 *		fk-column=&#8221;a_id_fk&#8221;<br />
	 *		fk-constraint=&#8221;false&#8221;<br />
	 */</p>
<p>	public abstract Collection getBidfk();</p>
<p>	/**<br />
	 *<br />
	 * @param java.util.Set the new b_id_fk value<br />
	 *<br />
	 * @ejb.interface-method<br />
	 *<br />
	 *<br />
	 */</p>
<p>	public abstract void setBidfk(Collection b);</p>
<p>	public void setEntityContext(EntityContext ctx) {<br />
		this.ctx = ctx;<br />
	}</p>
<p>	public void unsetEntityContext() {<br />
		this.ctx = null;<br />
	}</p>
<p>	/**<br />
	 * The  ejbCreate method.<br />
	 *<br />
	 * @ejb.create-method<br />
	 */<br />
	public java.lang.Long ejbCreate(Collection b) throws javax.ejb.CreateException {</p>
<p>		setAid(new Long(0));</p>
<p>		try {<br />
			BLocalHome bLocalHome = BUtil.getLocalHome();</p>
<p>			java.util.Iterator it = b.iterator();<br />
			while (it.hasNext()) {<br />
				bLocalHome.create(getAid());<br />
			}<br />
		} catch (Exception e) {<br />
			System.out.println(&#8220;a.ejbCreate&#8221;);<br />
			System.out.println(e.getStackTrace());<br />
		}</p>
<p>		return null;<br />
	}</p>
<p>	/**<br />
	 * The container invokes this method immediately after it calls ejbCreate.<br />
	 *<br />
	 */<br />
	public void ejbPostCreate(Collection b) throws javax.ejb.CreateException {</p>
<p>		try {<br />
			BLocalHome bLocalHome = BUtil.getLocalHome();<br />
			setBidfk(bLocalHome.findByForeignKey(getAid()));<br />
		} catch (Exception e) {<br />
			System.out.println(&#8220;a.ejbPostCreate&#8221;);<br />
			System.out.println(e.getStackTrace());<br />
		}</p>
<p>	}</p>
<p>	/**<br />
	* Returns the a_id<br />
	* @return the a_id<br />
	*<br />
	* @ejb.persistent-field<br />
	* @ejb.persistence<br />
	*    column-name=&#8221;a_id&#8221;<br />
	*     sql-type=&#8221;fixed(10)&#8221;<br />
	* @ejb.pk-field<br />
	* @ejb.interface-method<br />
	*<br />
	* &#8211;<br />
	* This is needed for JOnAS.<br />
	* If you are not using JOnAS you can safely remove the tags below.<br />
	* @jonas.cmp-field-jdbc-mapping  field-name=&#8221;a_id&#8221;<br />
	*	jdbc-field-name=&#8221;a_id&#8221;<br />
	*<br />
	&#8211;<br />
	*/<br />
	public abstract java.lang.Long getA_id();</p>
<p>	/**<br />
	* Sets the a_id<br />
	*<br />
	* @param java.lang.Long the new a_id value<br />
	*<br />
	* @ejb.interface-method<br />
	*/<br />
	public abstract void setA_id(java.lang.Long a_id);</p>
<p>}</p>
<p>/*<br />
 * Created on Dec 29, 2005<br />
 *<br />
 * To change the template for this generated file go to<br />
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments<br />
 */<br />
package ejb;</p>
<p>import javax.ejb.EntityBean;<br />
import javax.ejb.EntityContext;<br />
import java.lang.Long;</p>
<p>/**<br />
 * @ejb.bean name=&#8221;B&#8221;<br />
 *	jndi-name=&#8221;BBean&#8221;<br />
 *	type=&#8221;CMP&#8221;<br />
 *  primkey-field=&#8221;b_id&#8221;<br />
  *  schema=&#8221;b&#8221;<br />
 *  cmp-version=&#8221;2.x&#8221;<br />
 *<br />
 *&#8211;<br />
 * This is needed for JOnAS.<br />
 * If you are not using JOnAS you can safely remove the tags below.<br />
 * @jonas.bean ejb-name=&#8221;B&#8221;<br />
 *	jndi-name=&#8221;BBean&#8221;<br />
 * @jonas.jdbc-mapping  jndi-name=&#8221;java:/SapdbDS&#8221; jdbc-table-name=&#8221;b&#8221;<br />
 * &#8211;<br />
 *<br />
 *  @ejb.persistence<br />
 *   table-name=&#8221;b&#8221;<br />
 *<br />
 * @ejb.finder<br />
 *    query=&#8221;SELECT OBJECT(a) FROM b as a&#8221;<br />
 *    signature=&#8221;java.util.Collection findAll()&#8221;<br />
 *<br />
  * @ejb.finder<br />
 * 	query=&#8221;SELECT OBJECT(a) FROM a as a WHERE a_id_fk=?1&#8243;<br />
 * 	signature=&#8221;java.util.Collection findByForeignKey(java.lang.Long a)&#8221;<br />
 *&#8211;<br />
 * This is needed for JOnAS.<br />
 * If you are not using JOnAS you can safely remove the tags below.<br />
 * @jonas.finder-method-jdbc-mapping  method-name=&#8221;findAll&#8221;<br />
 *	jdbc-where-clause=&#8221;"<br />
 * @jonas.jdbc-mapping  jndi-name=&#8221;java:/SapdbDS&#8221;<br />
 *	jdbc-table-name=&#8221;b&#8221;<br />
 *<br />
 *&#8211;<br />
 *<br />
 **/</p>
<p>public abstract class BBean implements EntityBean {</p>
<p>/*	public abstract ALocal getABean();</p>
<p>	public abstract void setABean(ALocal abean);</p>
<p>*/<br />
	protected EntityContext ctx = null;</p>
<p>	public void setEntityContext(EntityContext ctx) {<br />
		this.ctx = ctx;<br />
	}</p>
<p>	public void unsetEntityContext() {<br />
		this.ctx = null;<br />
	}</p>
<p>	/**<br />
	 * The  ejbCreate method.<br />
	 *<br />
	 * @ejb.create-method<br />
	 */<br />
	public java.lang.Long ejbCreate(Long a_id_fk) throws javax.ejb.CreateException {</p>
<p>		setB_id(new Long(0));<br />
		setAidfk(a_id_fk);</p>
<p>		return null;<br />
	}</p>
<p>	/**<br />
	 * The container invokes this method immediately after it calls ejbCreate.<br />
	 *<br />
	 */<br />
	public void ejbPostCreate() throws javax.ejb.CreateException {<br />
	}</p>
<p>	/**<br />
	* Returns the b_id<br />
	* @return the b_id<br />
	*<br />
	* @ejb.persistent-field<br />
	* @ejb.persistence<br />
	*    column-name=&#8221;b_id&#8221;<br />
	*     sql-type=&#8221;fixed(10)&#8221;<br />
	* @ejb.pk-field<br />
	* @ejb.interface-method<br />
	*<br />
	* &#8211;<br />
	* This is needed for JOnAS.<br />
	* If you are not using JOnAS you can safely remove the tags below.<br />
	* @jonas.cmp-field-jdbc-mapping  field-name=&#8221;b_id&#8221;<br />
	*	jdbc-field-name=&#8221;b_id&#8221;<br />
	*<br />
	&#8211;<br />
	*/<br />
	public abstract java.lang.Long getB_id();</p>
<p>	/**<br />
	* Sets the b_id<br />
	*<br />
	* @param java.lang.Long the new b_id value<br />
	*<br />
	* @ejb.interface-method<br />
	*/<br />
	public abstract void setB_id(java.lang.Long b_id);</p>
<p>	/**<br />
	* Returns the a_id_fk<br />
	* @return the a_id_fk<br />
	*<br />
	* @ejb.persistent-field<br />
	* @ejb.persistence<br />
	*    column-name=&#8221;a_id_fk&#8221;<br />
	*     sql-type=&#8221;fixed(10)&#8221;<br />
	*<br />
	* @ejb.interface-method<br />
	*<br />
	* &#8211;<br />
	* This is needed for JOnAS.<br />
	* If you are not using JOnAS you can safely remove the tags below.<br />
	* @jonas.cmp-field-jdbc-mapping  field-name=&#8221;a_id_fk&#8221;<br />
	*	jdbc-field-name=&#8221;a_id_fk&#8221;<br />
	*<br />
	&#8211;<br />
	*/<br />
	public abstract java.lang.Long getAidfk();</p>
<p>	/**<br />
	* Sets the a_id_fk<br />
	*<br />
	* @param java.lang.Long the new a_id_fk value<br />
	*<br />
	* @ejb.interface-method<br />
	*/<br />
	public abstract void setAidfk(java.lang.Long aidfk);</p>
<p>}</p>
<p>   Generated by XDoclet</p>
<p>      markup for those beans.<br />
     &#8211;&gt;</p>
<p>         B</p>
<p>         ejb.BHome<br />
         ejb.B<br />
         ejb.BLocalHome<br />
         ejb.BLocal</p>
<p>         ejb.BCMP<br />
         Container<br />
         java.lang.Long<br />
         False<br />
         2.x<br />
         b</p>
<p>            b_id</p>
<p>            aidfk</p>
<p>         b_id</p>
<p>               findAll</p>
<p>               findByForeignKey</p>
<p>                  java.lang.Long</p>
<p>         A</p>
<p>         ejb.AHome<br />
         ejb.A<br />
         ejb.ALocalHome<br />
         ejb.ALocal</p>
<p>         ejb.ACMP<br />
         Container<br />
         java.lang.Long<br />
         False<br />
         2.x<br />
         a</p>
<p>            a_id</p>
<p>         a_id</p>
<p>               findAll</p>
<p>      markup for those beans.<br />
     &#8211;&gt;</p>
<p>      markup for those beans.<br />
     &#8211;&gt;</p>
<p>         a-refers-to-b</p>
<p>            aTob<br />
            One</p>
<p>               A</p>
<p>               bidfk<br />
               java.util.Collection</p>
<p>            bToa</p>
<p>            Many</p>
<p>               B</p>
<p>      markup.<br />
     &#8211;&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeger Hendrikse</title>
		<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/#comment-419</link>
		<dc:creator>Zeger Hendrikse</dc:creator>
		<pubDate>Thu, 02 Jun 2005 08:30:43 +0000</pubDate>
		<guid isPermaLink="false">/?p=98#comment-419</guid>
		<description><![CDATA[I&#039;m afraid not, but there &lt;b&gt;is&lt;/b&gt; a comprehensive post on a uni-directional one-to-one relationship, see &lt;a href=&quot;http://technology.amis.nl/blog/index.php?p=90&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt;. Combining the information of these two posts, you should have enough information to get your specific case up and running without too much effort.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m afraid not, but there <b>is</b> a comprehensive post on a uni-directional one-to-one relationship, see <a href="http://technology.amis.nl/blog/index.php?p=90" rel="nofollow">this post</a>. Combining the information of these two posts, you should have enough information to get your specific case up and running without too much effort.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephen smithstone</title>
		<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/#comment-418</link>
		<dc:creator>stephen smithstone</dc:creator>
		<pubDate>Wed, 01 Jun 2005 11:06:59 +0000</pubDate>
		<guid isPermaLink="false">/?p=98#comment-418</guid>
		<description><![CDATA[Is there an article on uni-directonal one-to-many relationships anywhere on this site]]></description>
		<content:encoded><![CDATA[<p>Is there an article on uni-directonal one-to-many relationships anywhere on this site</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeger Hendrikse</title>
		<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/#comment-417</link>
		<dc:creator>Zeger Hendrikse</dc:creator>
		<pubDate>Wed, 18 May 2005 13:58:57 +0000</pubDate>
		<guid isPermaLink="false">/?p=98#comment-417</guid>
		<description><![CDATA[I never implemented a case where you want to have an additional column in the link table. I&#039;m afraid that you cannot make use of this &quot;implicit table definition mechanism&quot; anymore. However, you can always define your link table as a separate entity bean with the proper relations, of course, including additional columns.

I&#039;m not quite sure though what you mean with the registry, but hopefully this answer suffices already.]]></description>
		<content:encoded><![CDATA[<p>I never implemented a case where you want to have an additional column in the link table. I&#8217;m afraid that you cannot make use of this &quot;implicit table definition mechanism&quot; anymore. However, you can always define your link table as a separate entity bean with the proper relations, of course, including additional columns.</p>
<p>I&#8217;m not quite sure though what you mean with the registry, but hopefully this answer suffices already.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Natalia Camargo</title>
		<link>http://technology.amis.nl/2004/07/30/ejb-mn-relationship-in-jboss-xdoclet/#comment-416</link>
		<dc:creator>Natalia Camargo</dc:creator>
		<pubDate>Wed, 18 May 2005 01:33:46 +0000</pubDate>
		<guid isPermaLink="false">/?p=98#comment-416</guid>
		<description><![CDATA[Hi
This article is very clear, but I have a question: What if I need to
have another column in the &quot;relation table&quot;? A different column related
with the registry....
Thanks for your help.]]></description>
		<content:encoded><![CDATA[<p>Hi<br />
This article is very clear, but I have a question: What if I need to<br />
have another column in the &#8220;relation table&#8221;? A different column related<br />
with the registry&#8230;.<br />
Thanks for your help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
