Hi,This weekend support for database views has been added to the Data-Access-Layer (DAL), the required changes have been pushed to the pi-development repository and will be available in the next MP.
Database Views are treated in the same way as tables by the Data Access Layer. This means that: - A database view must be defined in AD_Table for the DAL to be able to consider it. - A database view must have one primary key column defined in AD_COLUMN. This column must contain unique values. - Entities are generated for database views, database views can be queried using Hibernate queries and the Dal query classes (OBDal, OBQuery, OBCriteria) - The rest web services and xml conversion works the same as for standard tables (ofcourse only export works, imports/updates/inserts are not possible). - A database view defined in the AD which does not have a primary key column defined in AD_Column is ignored by the DAL.
Currently there are several database views defined in the Application Dictionary AD_Table. Some of them don't have a primary key column defined, this is reported as the following issue:
https://issues.openbravo.com/view.php?id=14696 (Repair db-views which don't have a primary key defined in ad_column)-- With Regards, Martin Taal Openbravo M: +31 6 288 48 943 @: martin.t...@openbravo.com Skype: martintaal Openbravo Headquarters: P: +34 93 27 25 947 F: +34 93 27 25 905 Address: Edificio Slan, Planta 2a, Landaben, Calle J, 31012 Pamplona, Navarra, Spain Mailing address: PO Box 5117, 31010 Pamplona, Navarra, Spain
------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________ Openbravo-development mailing list Openbravo-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-development