如何禁用Subsonic的主键自增?
我正在使用 Subsonic (simplerepository) 和 SQLite,并且我有一个 Int64 属性标记为 [SubSonicPrimaryKey]: 的类,
[SubSonicPrimaryKey]
public Int64 MyID;
该属性被转换为:
[MyID] integer NOT NULL PRIMARY KEY AUTOINCRMENT
是否可能禁用自动增量功能?
I'm using Subsonic (simplerepository) and SQLite, and I have a class with an Int64 property marked as [SubSonicPrimaryKey]:
[SubSonicPrimaryKey]
public Int64 MyID;
which is transformed into:
[MyID] integer NOT NULL PRIMARY KEY AUTOINCREMENT
Is it possible to disable the AUTOINCREMENT feature?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,是我自己找到的。自动增量功能是自动的,无法关闭。该代码的作用如下:
Well, I found it by myself. Autoincrement feature is automatic and cannot be switched off. Here's what the code does: