0
我剛剛下載了subsonic 3,但是當我嘗試編譯我的網站時,出現了一些錯誤。這些錯誤似乎都與我使用GUID作爲外鍵的情況有關。 一個例子是下面的代碼,其中CreatedBy是我的成員資格表的外鍵。我已經突出顯示了受影響的行。Subsonic ActiveRecord由於GUID導致編譯失敗
public void Add(IDataProvider provider){
**if(String.IsNullOrEmpty(this.CreatedBy))
this.CreatedBy=Environment.UserName;**
var key=KeyValue();
if(key==null){
var newKey=_repo.Add(this,provider);
this.SetKeyValue(newKey);
}else{
_repo.Add(this,provider);
}
SetIsNew(false);
OnSaved();
}
public void Add(string username){
**this.CreatedBy=username;**
Add();
}
public void Add(string username, IDataProvider provider){
**this.CreatedBy=username;**
Add(provider);
}