【发布时间】:2013-12-09 14:22:57
【问题描述】:
我正在使用 wso2dss3.0.1 并使用 POSTGRESSQL 数据库,所以我的数据库中有表,例如
uuid table
========================
column name | datatype
----------------------------------
uuid | uuid
deviceid | bigint
objectid | bigint
message | string
所以我希望使用 wso2dss 插入数据,但它无法插入并给出这样的错误
</soapenv:Text>
</soapenv:Reason>
<soapenv:Detail>
<axis2ns1:DataServiceFault xmlns:axis2ns1="http://ws.wso2.org/dataservice">DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: taction_DataService
Location: /taction_DataService.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: insertinto_seenuuid_op
Current Params: {uuid=a0eebc999c0b4ef8bb6d6bb9bd380a11, objectid=-1, deviceid=-1}
Nested Exception:-
org.postgresql.util.PSQLException: ERROR: column "uuid" is of type uuid but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 53
</axis2ns1:DataServiceFault>
</soapenv:Detail>
</soapenv:Fault>
现在我的问题是我的数据库列类型已修复我无法更改它我将如何使用 wso2dss 将其发送到数据库如果可能的话我可以在 DSS 查询参数中使用什么类型的数据类型因为没有 UUID 类型存在 有什么方法可以通过 DSS 发送 UUID
【问题讨论】:
-
消息告诉你投它…
CAST(col as uuid)或(在postgres中)col::uuid -
insert into seenuuid(CAST(col as uuid),deviceid,objectid) values(?,?,?) 我已经这样做了,但是在 CAST 出现语法错误
-
插入 seeuuid(uuid::uuid,deviceid,objectid) 值(?,?,?) -
对不起 CAST 工作老板,谢谢
标签: postgresql wso2 wso2esb wso2dss