Hi Richard,
Please find explanations to your queries below,
> Does this preview release accurately reflect the O/R mapping capabilities
> that will be in place in the final product, or can we expect to see
> additional capabilities before the product goes final.
Featue wise the O/R mapping tool is the final cut for the final product.
With CMP 2.0 beans the O/R mapping information supplied at deploy time can
be categorised as follows,
1. CMF(Conatiner Managed Field) mapping
This is the same as in the CMP 1.1 beans. You have to map each of
the CMF field to the field of a table in the persistence storage.
2. specifying CMR(Conatiner Managed Relationship) join conditions.
This involves specifying the join conditions for all the CMRs that a
bean is involed in, so that the CMR fields can be materialized by the
container. The DeployTool shipped with the container provides automatic
resolution of join conditions. This is possible by the virtue of a database
introspection routine that is built into the DeployTool which looks for
constraints defined in the database depending on the cardinality of a
relationship. For example in the case of a one to many relationship between
two entities, it would retrieve the join condition in case the table to
which the entity with the multiplicity many is mapped contains a foreign key
to the table to which the entity with multiplicity one is mapped.
You may check this feature on the sample application (orderApp.ear) shipped
with the product. To check this please follow the steps below,
1. Make a copy of orderApp.ear.
2. Delete pramati-or-map.xml and pramati-j2ee-server.xml from the
orderApp.ear.
3. Now open the ear file on the DeployTool. At this moment no O/R mapping
information is available. The DeployTool detects the number tasks that are
to be completed before the ear can be deployed. This will be displayed at
the bottom right-hand corner of the deploy tool dialog. Clicking on the
"TASK ICON" will lead you to the next task to be resolved.
4. You may click on the CMR tab to view the relationships that a bean is
involved in and status of each of these relationships, which will be shown
"unresolved" at this stage as the CMF fields have not been mapped.
5. After you specify the mapping for the CMFs of the two beans involved in a
relationship, the join conditions would be automatically resloved and the
status would be changed to "Resolved".
eg. In our example CustomerBean and AddressBean are involved in a one to
one unidirectional relationship. In the database ADDRESS_DVITIYA table has
the foreign key to the CUSTOMER_DVITIYA table. The DeployTool resolves the
join condition for this CMR as soon as the CMFs for these two beans have
been specified.
6. Repeat the above for all the other entity beans in the archive.
NOTE : DO NOT HIT THE DEPLOY ITEM ON THE MANU BAR TILL ALL THE TASKS HAVE
BEEN COMPLETED
Please let us know if there is a scope for improvement in the current
deploytool.
Thnaks & Regards,
Gautam
Server Team
www.pramati.com