從統一JDBC download page:如何使用Unity JDBC驅動程序連接兩個MongoDB集合?
如果SQL查詢需要加入或不MongoDB的支持的功能,那麼查詢被提升到UnityJDBC(試用版)。 UnityJDBC試用版沒有失效日期,並且功能完全正常,但僅限於返回100個結果。
然而,當我嘗試加入使用任何語法兩個表像
SELECT * from a, b WHERE a.id = b.id
SELECT * from a INNER JOIN b ON a.id = b.id
SELECT * from a INNER JOIN b USING (id)
結果如下:
Exception: java.sql.SQLException: ERROR: No schema defined. The default schema location is _schema in the current database. You need write permission to create this collection. Otherwise, use the schema parameter to set a file location (e.g. schema=mongo.xml) to store the schema. See connection parameters at http://www.unityjdbc.com/mongojdbc/ for more details.
java.sql.SQLException: ERROR: No schema defined. The default schema location is _schema in the current database. You need write permission to create this collection. Otherwise, use the schema parameter to set a file location (e.g. schema=mongo.xml) to store the schema. See connection parameters at http://www.unityjdbc.com/mongojdbc/ for more details.
at mongodb.conn.ServerConnection.processMongoWithUnity(Unknown Source)
at mongodb.conn.ServerConnection.executeQuery(Unknown Source)
at mongodb.jdbc.MongoStatement.executeQuery(Unknown Source)
at mongodb.ExampleMongoJDBC.doQuery(ExampleMongoJDBC.java:222)
at mongodb.ExampleMongoJDBC.main(ExampleMongoJDBC.java:66)
好了,所以我把在自述中查看,發現它提到了code/test/dspec /文件夾以及與模式相關的一些文件。我打開了幾個,它們是所有將它們映射到關係數據類型的集合的高度詳細的xml文件。
我必須寫出其中的一個,還是有辦法自動生成它?