View source | Discuss this page | Page history | Printable version   
Main Page
Upload file
What links here
Recent changes

PDF Books
Add page
Show collection (0 pages)
Collections help


How to exclude Database Physical Objects From Model


Openbravo keeps track of the database physical objects (such as tables, views, functions or triggers) through an utility called [DBSourceManager]. This utility is able to export all the database model object definitions to XML files, which are stored in the src-db/database/model folder (both in Core and in modules).

This tool is designed to work in a multiplatform environment, both supporting Oracle and PostgreSQL. This means that sometimes if specific syntax or features of a particular Database Management System are used, the tool might not support them.

In these cases, a possible approach is to create these specific objects using a Module Script (you can find more about them here), and then exclude them from the database physical model of Openbravo.

Excluding objects in modules

Objects are excluded through a file called excludeFilter.xml. This file should be located inside the src-db/database/model/ folder of the module (if it doesn't exist, you will need to create it), and it follows a very simple XML format. Here is an example:

<?xml version="1.0"?>
    <excludedTable name="TEST_TABLE"/>
    <excludedView name="TEST_VIEW"/>
    <excludedFunction name="TEST_FUNCTION"/>
    <excludedTrigger name="TEST_TRIGGER"/>

This file will exclude the table TEST_TABLE, the view TEST_VIEW, the function TEST_FUNCTION, and the trigger TEST_TRIGGER from the model, and therefore they will be neither exported nor removed, nor modified in any way during the normal database management tasks (update.database and export.database).

Retrieved from ""

This page has been accessed 11,360 times. This page was last modified on 13 July 2011, at 09:37. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.