I have dotConnect for Oracle 9.13.1098 (trial).
In order to avoid of using nullable values in primary key fields I add ROWID as a primary key, but I have problems in assosiations between child and parent entites. Namely, there are problems in casting System.Int64 to System.String.
I have two classes in C#:
Code: Select all
[Table(Name = "TABLE1")]
public class TdfBlock
{
long _No;
//[Column(Name = "NO", Storage = "_No", IsPrimaryKey = true)]
[Column(Name = "NO", Storage = "_No")]
public long No { get { return _No; } }
string _Rowid;
[Column(Name = "ROWID", Storage = "_Rowid", IsPrimaryKey = true)]
public string Rowid { get { return _Rowid; } }
EntitySet<TypeTreeMapping.BaseClasses.Kernel.T51.TdfField> _ES_TdfFields_BlockNo = new EntitySet<TypeTreeMapping.BaseClasses.Kernel.T51.TdfField>();
[Association(OtherKey = "BlockNo", Storage = "_ES_TdfFields_BlockNo")]
public EntitySet<TypeTreeMapping.BaseClasses.Kernel.T51.TdfField> ES_TdfFields_BlockNo { get { return _ES_TdfFields_BlockNo; } }
}
Code: Select all
[Table(Name = "TABLE2")]
public class TdfField
{
//long _No;
////[Column(Name = "NO", Storage = "_No"]
//[Column(Name = "NO", Storage = "_No", IsPrimaryKey = true)]
//public long No { get { return _No; } }
string _Rowid;
[Column(Name = "ROWID", Storage = "_Rowid", IsPrimaryKey = true)]
public string Rowid { get { return _Rowid; } }
long? _BlockNo;
///<summary>Номер блока, в котором содержится поле</summary>
[Column(Name = "BLOCK_NO", Storage = "_BlockNo")]
public long? BlockNo { get { return _BlockNo; } }
EntityRef<TypeTreeMapping.BaseClasses.Kernel.T50.TdfBlock> _ER_BlockNo_50;
[Association(ThisKey = "BlockNo", Storage = "_ER_BlockNo_50")]
public TypeTreeMapping.BaseClasses.Kernel.T50.TdfBlock E_BlockNo_50
{
get
{
return _ER_BlockNo_50.Entity;
}
}
}
Has anybody solves this problem?