Comments (11)
问题描述清楚
1、数据库是什么?
2、objId是什么类型
3、数据库主键是什么类型
4、错误的 message是什么
from sqlsugar.
问题描述清楚 1、数据库是什么? 2、objId是什么类型 3、数据库主键是什么类型 4、错误的 message是什么
数据库是 sql server
objId是guid
数据库主键是guid
错误的 message是操作数类型冲突: uniqueidentifier 与 bigint 不兼容
from sqlsugar.
截图具体错误
from sqlsugar.
截图具体错误
from sqlsugar.
db.CodeFirst.InitTables<Uniatafa>();//建表
object id1 = Guid.NewGuid();
db.Insertable(new Uniatafa() { Name = "a", xx = (Guid)id1 }).ExecuteCommand();
var list = db.Queryable<Uniatafa>().InSingleAsync(id1).GetAwaiter().GetResult();
public class Uniatafa
{
[SugarColumn(IsPrimaryKey =true)]
public Guid xx { get; set; }
public string Name { get; set; }
}
不能重现你说的问题,上面测试用例 写一个可以重现的 DEMO
from sqlsugar.
我怀疑是你数据库类型有问题可能你数据库是 bigint
from sqlsugar.
db.CodeFirst.InitTables<Uniatafa>();//建表 object id1 = Guid.NewGuid(); db.Insertable(new Uniatafa() { Name = "a", xx = (Guid)id1 }).ExecuteCommand(); var list = db.Queryable<Uniatafa>().InSingleAsync(id1).GetAwaiter().GetResult(); public class Uniatafa { [SugarColumn(IsPrimaryKey =true)] public Guid xx { get; set; } public string Name { get; set; } }不能重现你说的问题,上面测试用例 写一个可以重现的 DEMO
好的 我试试 谢谢
from sqlsugar.
我怀疑是你数据库类型有问题可能你数据库是 bigint
数据库是guid的 这个可以确定 数据库是老项目设计好的
from sqlsugar.
那就需要DEMO了,不能重现
from sqlsugar.
那就需要DEMO了,不能重现
抱歉啊 我测试demo是ok的 可能是我自己封装的仓库里面写的有问题
我在找找 谢谢
from sqlsugar.
那就需要DEMO了,不能重现
麻烦关一下issue 谢谢 打扰了
from sqlsugar.
Related Issues (20)
- PostgreSql Insertable 一串 List 的时候, 9999-12-31 23:59:59.999999 会变成 “ HOT 4
- PostgreSql Insertable 一串 List 的时候, 9999-12-31 23:59:59.999999 会变成 "10000-01-01 00:00:00" HOT 5
- [SplitTable] No gen Sql query when use SplitTable(dateBegin,dateEnd)
- Issue Running Simple MAUI App Android HOT 4
- 在调用 Db.CodeFirst.InitTables(@"xxx.xxx.models"); 显示System.IO.FileNotFoundException: Could not load file or assembly HOT 3
- 有增加国产数据库yashandb的计划吗 HOT 5
- SampleBy方法中的SampleByUnit 有bug,sampleBy.ToString().Substring(0, 1).ToLower()这个如果是Month,会按照分钟计算 HOT 10
- DBFrist產生出來的Class名稱跟屬性名稱相同 HOT 4
- DBFrist可以添加required關鍵字嗎? HOT 11
- 支持 Apache Kyubbi 吗? HOT 2
- Npgsql.PostgresException: 42804: HOT 11
- SqlFunc.Subqueryable 跨库子查询联表无效 HOT 2
- ToPageList和ToOffsetPage,在Postgre 15下分页返回数据异常 HOT 19
- 使用逻辑删除LogicDeleteProvider.ExecuteCommandAsync出现.NullReferenceException异常 HOT 6
- 关联表过滤器问题 HOT 3
- PG数据库添加字段默认值问题 HOT 10
- 国内BUG统一提交入口 - 世界上最勤快的开源,秒解决 HOT 1
- 使用ODBC连接的时候可以成功连接,但是不能读取数据 HOT 4
- 加一个 find_in_set 我怎么没有找到 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlsugar.