Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3066E200BBE for ; Fri, 11 Nov 2016 09:47:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2F210160AE4; Fri, 11 Nov 2016 08:47:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 75AAC160AF5 for ; Fri, 11 Nov 2016 09:47:00 +0100 (CET) Received: (qmail 48551 invoked by uid 500); 11 Nov 2016 08:46:59 -0000 Mailing-List: contact notifications-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list notifications@ofbiz.apache.org Received: (qmail 48537 invoked by uid 99); 11 Nov 2016 08:46:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2016 08:46:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 649BA2C4C73 for ; Fri, 11 Nov 2016 08:46:59 +0000 (UTC) Date: Fri, 11 Nov 2016 08:46:59 +0000 (UTC) From: "Jacques Le Roux (JIRA)" To: notifications@ofbiz.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OFBIZ-7129) Recognise "BASE TABLE" table type in metadata MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 11 Nov 2016 08:47:01 -0000 [ https://issues.apache.org/jira/browse/OFBIZ-7129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15656536#comment-15656536 ] Jacques Le Roux commented on OFBIZ-7129: ---------------------------------------- Thanks for the update Paul > Recognise "BASE TABLE" table type in metadata > --------------------------------------------- > > Key: OFBIZ-7129 > URL: https://issues.apache.org/jira/browse/OFBIZ-7129 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Trunk > Reporter: Paul Foxworthy > Assignee: Paul Foxworthy > Attachments: OFBIZ-7129_BaseTableMetadata.patch, OFBIZ-7129_BaseTableMetadata.patch > > > In framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java, the getTableNames method looks for table types of "TABLE", "VIEW", "ALIAS" and "SYNONYM" (https://fisheye6.atlassian.com/browse/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?r=1644354#to989). > MariaDB produces a table type of "BASE TABLE", so OFBiz didn't detect the tables were there, and attempted to create them. In fact, the tables do exist so the create failed. > The JDBC docs suggest that plain "TABLE" is a "typical" value for table type (https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getTables-java.lang.String-java.lang.String-java.lang.String-java.lang.String:A-) > But it seems "BASE TABLE" is more standards compliant - see for example http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt page 576. I assume some JDBC drivers transform "BASE TABLE" to plain "TABLE", but the MariaDB one does not. > I've attached a patch so OFBiz will recognise "BASE TABLE" if that's what it receives in the metadata. -- This message was sent by Atlassian JIRA (v6.3.4#6332)