db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1325103 - in /db/torque/torque4/trunk/torque-test/src/main/schema: bookstore-schema.xml view-schema.xml
Date Thu, 12 Apr 2012 02:04:05 GMT
Author: tfischer
Date: Thu Apr 12 02:04:05 2012
New Revision: 1325103

URL: http://svn.apache.org/viewvc?rev=1325103&view=rev
Log:
Fix test project on jenkins.
For derby, referenced tables must exist before a view can reference them and SQL execution
file order is random in jenkins, so if tables and views are defined in separate files in some
cases the view cannot be created.
The solution is to put the view in the same file as the referenced tables.

Removed:
    db/torque/torque4/trunk/torque-test/src/main/schema/view-schema.xml
Modified:
    db/torque/torque4/trunk/torque-test/src/main/schema/bookstore-schema.xml

Modified: db/torque/torque4/trunk/torque-test/src/main/schema/bookstore-schema.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/bookstore-schema.xml?rev=1325103&r1=1325102&r2=1325103&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/bookstore-schema.xml (original)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/bookstore-schema.xml Thu Apr 12 02:04:05
2012
@@ -286,4 +286,15 @@
     />
   </table>
 
+  <!-- =================================================== -->
+  <!-- B O O K _ A U T H O R  V I E W                      -->
+  <!-- =================================================== -->
+
+  <view name="BOOK_AUTHORS" sqlSuffix="from book join author on book.author_id=author.author_id">
+    <column name="book_id" type="INTEGER" select="book.book_id"/>
+    <column name="author_id" type="INTEGER" select="author.author_id"/>
+    <column name="book_title" type="VARCHAR" select="book.title"/>
+    <column name="author_name" type="VARCHAR" select="author.name"/>
+  </view>
+
 </database>



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message