About this task
To
create a database connector in the Data Source Explorer view, do
the following:
To
create a Database connector on the Data Source Explorer view
Procedure
- Expand the tree view of the
Database Explorer view and locate the table or view for which you
want to create a Database connector.
- Do either of the following:
To
accept all of the default values and populate the design canvas
with all columns in the table, drag the table from the DataSource Explorer view
to the design canvas.
—OR—
To
choose values other than the defaults, do the following:
- Right-click
the table and click Generate
Database Connector.
- If the project in the Project field
is correct, click Next.
- In Managed Bean Name field
of the DB Client Properties panel, either accept the default name
or type anew one.
To allow the database
connector to write to the database, clear the Read-only client option,
and click Next.
Connectors are read-only by default.
- In Query Columns Selection,
choose the table columns to query.
(Optional) To
add another table, click Add Table,
choose a table, and click OK.
For tables that have foreign key relations
with the main table, the join condition is added automatically.
Click Finish.
The managed bean appears on the Bindings
view. For more information, see The Bindings View.
- Drag the managed bean for the database
connector from the Bindings view to the design canvas.