"ericmacau" wrote:
Hi,
I just download the EJB3 preview and try to run the examples, those are works fine. But I have something misunderstood.
1. There is a target "entity2xml"
<target name="entity2xml" depends="prepare"> <java fork="yes" failOnError="true" className="org.jboss.ejb3.entity.EntityToHibernateXml"> <classpath refid="classpath"/> <arg value="org.jboss.tutorial.entity.bean.Order"/> <arg value="org.jboss.tutorial.entity.bean.LineItem"/> </java> </target>
- What is the output and where does it locate ? But not all the build.xml includes this, only in entity example, why? And when need to use this "entity2xml" ??
2. The following is cut from Customer.java in relationships folder,
@OneToOne(cascade = {CascadeType.ALL})
@JoinColumn(name = "ADDRESS_ID")
public Address getAddress()
{
return address;
}
- I checked the Address.java, it only has the following tag:
@Id(generate = GeneratorType.IDENTITY)
public Long getId()
{
return id;
}
- How can it know it is the ADDRESS_ID, or can I use different name, such as ADDR_ID ???
Is there any document to describe the usage of all the TAGS ???
Eric