我正在使用postman和dreamfactory,当我发送帖子请求以在表格中创建记录时,我收到以下错误消息。我正在使用MySQL作为我的数据库。我相信这可能是因为我没有正确建立我的外键关系。我该如何设置呢?
Invalid schema detected - no type or db_type element.
General
----
Remote Address:[::1]:8080
Request
URL:http://localhost:8080/api/v2/MySQL/_schema/kartadb.country/1
Request Method:POST
Status Code:500 Internal Server Error
Response Headers
view source
Access-Control-Allow-Origin:chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop
Cache-Control:no-cache
Connection:close
Content-Type:application/json
Date:Tue, 20 Oct 2015 08:17:33 GMT
Server:Apache
Transfer-Encoding:chunked
Vary:Origin
X-Frame-Options:SAMEORIGIN
X-Powered-By:PHP/5.5.29
Request Headers
----
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Authorization:Basic dGV3b2Ryb3Mud3JAZ21haWwuY29tOg==
Cache-Control:no-cache
Connection:keep-alive
Content-Length:92
Content-Type:text/plain;charset=UTF-8
Host:localhost:8080
Origin:chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop
Postman-Token:3f469a4f-f95a-eb1f-c5eb-8da94b110e47
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
X-DreamFactory-Api-Key:6498a8ad1beb9d84d63035c5d1120c007fad6de706734db9689f8996707e0f7d
X-DreamFactory-Session-Token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjcsInVzZXJfaWQiOjcsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3Q6ODA4MFwvYXBpXC92MlwvdXNlclwvc2Vzc2lvbiIsImlhdCI6IjE0NDUzMjY2OTQiLCJleHAiOiIxNDQ1MzMwMjk0IiwibmJmIjoiMTQ0NTMyNjY5NCIsImp0aSI6ImNlMDJiMWU1ZTRjZjc4MmZmYTYxZmYyZDM1MGNiODg2In0.F0UcNExumeAwLF-xM6SmgKktcPSprYrS7x95KFJmYI4
答案 0 :(得分:2)
您提到在表格中创建“记录”。 / _schema资源用于创建表模式,而不是记录。使用/ _table资源创建记录。