|
3.9 How to Link to a Legacy Database This section looks at mapping the persistence layer of the model to an SQL table structure accessible via the application server. There are other ways of accessing legacy databases. For example methods could be made available to access the database through services that bypass the persistence layer altogether. The first thing to do is to get the data sources set up in the application server. This is server dependent and beyond the scope of this document. You should read your application server manual. There will be a default data source and this will be set up in the build configuration. If at all possible, only use one data source; querying across data sources is problematic. It is often possible to access one database directly from another and mirror the tables as views up into the application server. This may be preferable to accessing the several data sources directly. If you must override the default data source, do so using the property in the relevant entity.
If you only want the entity to access a subset of the data in the table, use a hidden attribute to limit the set. Links:
Copyright © 2001-2006 New Technology / enterprise Ltd. | |||||||||||||||||||||