mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 CodeFirst IsPrimary NOT NULL 生成,sqlite 可以插入 NULL 到主键;
This commit is contained in:
@ -322,6 +322,16 @@ namespace base_entity
|
||||
{
|
||||
public static int fsql;
|
||||
}
|
||||
class StringNulable
|
||||
{
|
||||
[Column(IsPrimary = true)]
|
||||
public string id { get; set; }
|
||||
[Column(StringLength = -1, IsNullable = true)]
|
||||
public string code1 { get; set; }
|
||||
[Column(StringLength = -1, IsNullable = false)]
|
||||
public string code2 { get; set; }
|
||||
}
|
||||
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
@ -379,6 +389,8 @@ namespace base_entity
|
||||
#endregion
|
||||
|
||||
|
||||
var ddlsql01 = fsql.CodeFirst.GetComparisonDDLStatements<StringNulable>();
|
||||
|
||||
Expression<Func<HzyTuple<User1, Group, Group, Group, Group, Group>, bool>> where = null;
|
||||
where = where.Or(a => a.t6.Index > 0);
|
||||
where = where.Or(a => a.t5.Index > 0);
|
||||
|
Reference in New Issue
Block a user