Subsonic :“System.UInt64”类型的对象 无法转换为类型“System.Int64”
我刚刚第一次将 Subsonic 连接到 MySql。 一切似乎都很酷,除了一个简单的:
wp_1_post.All().ToList();
抛出:
“System.UInt64”类型的对象无法转换为“System.Int64”类型。
看起来 wp_1_posts 表中的 ID 列是一个无符号的 bigint,只是不知道该怎么办......
I just hooked up Subsonic to MySql for the first time. Everything seems to be cool except a simple:
wp_1_post.All().ToList();
throws:
Object of type 'System.UInt64' cannot be converted to type 'System.Int64'.
It looks like the ID column in the wp_1_posts table is an unsigned bigint, just not sure what to do about it...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 MySQL.tt 中有一个检查(GetSysType),它决定哪种类型转到哪种数据库类型。 目前我们没有办法感知某些东西是否未签名(因为我不知道如何),但您需要做的是使用“ulong”来表示未签名的bigint。
如果你愿意帮助我们——那就太棒了。 只需编写一些代码来从 MySQL.tt 中的模式调用中获取列是否未签名。 我不知道该怎么做,而且我真的很努力寻找另一份工作:)
In MySQL.tt there is a check (GetSysType) which decides which type goes to which db type. At the moment we don't have a way to sense if something is unsigned (cause I don't know how) but what you would need to do is use "ulong" for unsigned bigint.
If you're up for helping us - it would rock. It would simply be writing some code that pulls whether a column is unsigned from the schema call in MySQL.tt. I don't know how to do it and I'm really slammed trying to find another job :)