Help

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

FAQ Category:

By default, Hibernate Tools (used by both seam-gen and JBoss Tools) focuses in on a single schema. You may have provided a schema when you setup the project or Hibernate Tools is simply using the default schema. To get Hibernate Tools to look at more than one schema, you need to customize the reverse engineering configuration.

If you are using seam-gen from the commmandline, first create a project using seam create-project. Then, populate the project file resources/seam-gen.reveng.xml with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering SYSTEM
   "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>

   <schema-selection match-schema="SCHEMA1"/>
   <schema-selection match-schema="SCHEMA2"/>

</hibernate-reverse-engineering>

If the database supports foreign keys that cross schemas, Hibernate Tools should create the appropriate associations in the entity classes. Hibernate Tools will also put the name of the schema in the @Table annotation on the entity class:

@Entity
@Table(name = "TABLE1", schema = "SCHEMA1")
public class Table1 implements java.io.Serializable {
   ...
}
7 comments:
09. Jul 2009, 14:38 America/New_York | Link
Morshed Akther

But how do i do reverse engineering using JBoss Tools for multiple schemas?

11. Aug 2009, 09:13 America/New_York | Link

exactly the same way.

When you use Seam Generate entities a Hibernate Tools code generation launch is generated which you can copy to allow you to edit it and set whatever custom setup you want, including a .reveng.xml.

 

Max Rydahl Andersen

 
05. Jan 2012, 02:42 America/New_York | Link

Hi, Can integration tests be run now on a Maven 2 template based project? Regards Mark Joe

 
12. Jan 2012, 23:13 America/New_York | Link

This is a really good read for me. Must admit that you are one of the best bloggers I have ever read. Thanks for posting this informative article.

Mole Removal

 
16. Jan 2012, 00:50 America/New_York | Link

Your blog page is excellent. Thank you truly for sharing a huge amount of powerful ideas. I will bookmark your web site and will be without a doubt coming back. Again, I appreciate all your work and supplying much priceless info for the many people.chin strap for snoring

 
16. Jan 2012, 01:37 America/New_York | Link

Interesting post and thanks for sharing. Some things in here I have not thought about before.Thanks for making such a cool post which is really very well written. Will be referring a lot of friends about this. Keep blogging jiu jitsu gear

 
17. Jan 2012, 05:15 America/New_York | Link

Interesting post and thanks for sharing. Some things in here I have not thought about before. Thanks for making such a cool post which is really very well written.mole removal