In databases relations are defined via foreign keys and there are a lot of different politics according to the level of relationships and ways how those relationships could be modeled in database. Anyway, cdbimport is able to recognize basic patterns of relationships, such as OneToMany, OneToOne and ManyToMany.
You are able to skip relationships loading by the
<dbimport> <skipRelationshipsLoading>true</skipRelationshipsLoading> </dbimport>
Another useful Cayenne reverse engineering property is
<skipPrimaryKeyLoading>. If you decide to support all relationships at the application layer
and avoid their management in database, you’ll find useful to turn off primary keys synchronization at all.
<dbimport> <skipPrimaryKeyLoading>true</skipPrimaryKeyLoading> </dbimport>
By default, cdbimport imports tables and views. Some databases may support other
table-like objects, e.g.
SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS,
SYNONYM, etc. To control which types should be included
<tableType></tableType> element is used. Some examples:
Import tables only (skip views and others and other types):
<dbimport> <tableType>TABLE</tableType> </dbimport>
Tables and views (the default option):
<dbimport> <tableType>TABLE</tableType> <tableType>VIEWS</tableType> </dbimport>