简体   繁体   English

流利的NHibernate Map Guid to Oracle Varchar2列

[英]Fluent NHibernate Map Guid to Oracle Varchar2 column

Can anyone help me how to map c# system.guid to oracle varchar2(100) . 谁能帮我将c# system.guid映射到oracle varchar2(100) I tried using 我尝试使用

Id(m=>m.Id).Column("xxx").GeneratedBy.Guid();

The query generated is without quotes and so failing insert in oracle. 生成的查询没有引号,因此在oracle中插入失败。

An educated guess. 有根据的猜测。

Id(m=>m.Id).Column("xxx").Not.Nullable() .CustomSqlType("varchar2(100)").GeneratedBy.Guid(); Id(m => m.Id).Column(“ xxx”)。Not.Nullable().CustomSqlType(“ varchar2(100)”)。GeneratedBy.Guid();

CustomSqlType being the new thing to consider. CustomSqlType是要考虑的新事物。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM