You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering issues on some data types like List and array with enum type.
Here's the code.
public static void TestOrientDBObjectTypeSupported()
{
var GlobalTestDatabaseName = "TestDatabaseNameAlias";
var GlobalTestDatabaseType = ODatabaseType.Graph;
var GlobalTestDatabaseAlias = "TestDatabaseNameAlias";
_server = new OServer(_hostname, _port, _rootUserName, _rootUserParssword);
if (_server.DatabaseExist(GlobalTestDatabaseName, OStorageType.PLocal))
{
_server.DropDatabase(GlobalTestDatabaseName, OStorageType.PLocal);
}
_server.CreateDatabase(GlobalTestDatabaseName, GlobalTestDatabaseType, OStorageType.PLocal);
OClient.CreateDatabasePool(
_hostname,
_port,
GlobalTestDatabaseName,
GlobalTestDatabaseType,
_username,
_password,
10,
GlobalTestDatabaseAlias
);
DateTime startTime = DateTime.Now;
Console.WriteLine("Start Time: " + startTime.ToLongTimeString());
using (ODatabase database = new ODatabase(GlobalTestDatabaseName))
{
database.Create.Class<DemoEmployee>().Run();
for (int index = 1; index <= 1; index++)
{
var employee = new DemoEmployee();
employee.SomeOtherId = Guid.NewGuid();
employee.Name = "Janet";
employee.Age = index;
employee.WorkingDays = new List<DayOfWeek>();
employee.WorkingDays.Add(DayOfWeek.Monday);
employee.WorkingDays.Add(DayOfWeek.Tuesday);
employee.WorkingDays.Add(DayOfWeek.Wednesday);
database.Insert<DemoEmployee>(employee).Run();
}
}
}
public class DemoEmployee
{
public Guid SomeOtherId { get; set; }
public string Name { get; set; }
public int Age { get; set; }
public long SomeVeryLongNumber { get; set; }
public decimal Salary { get; set; }
public List<DayOfWeek> WorkingDays { get; set; }
public DateTime? IncrementDate { get; set; }
public int? Height { get; set; }
public double Commission { get; set; }
public float Allowance { get; set; }
public DateTime BirthDate { get; set; }
public bool IsMarried { get; set; }
public List<int> SomeIntegerList { get; set; }
public int[] SomeIntegerArrayList { get; set; }
public List<decimal> SomeDecimalList { get; set; }
public decimal[] SomeDecomeArray { get; set; }
public List<DemoChild> Kids { get; set; }
public IList<int> SomeIListInteger { get; set; }
public Dictionary<int, string> MyKeyValues { get; set; }
public SortedList<int, string> YearlyAchievement { get; set; }
public Color MyFavoriteColor { get; set; }
public enum Color
{
Blue, Red
}
}
Please let me know if you need more info. Thanks.
Cordially,
Goh
The text was updated successfully, but these errors were encountered:
Hi,
I am encountering issues on some data types like List and array with enum type.
Here's the code.
public static void TestOrientDBObjectTypeSupported()
{
var GlobalTestDatabaseName = "TestDatabaseNameAlias";
var GlobalTestDatabaseType = ODatabaseType.Graph;
var GlobalTestDatabaseAlias = "TestDatabaseNameAlias";
public class DemoEmployee
{
public Guid SomeOtherId { get; set; }
Please let me know if you need more info. Thanks.
Cordially,
Goh
The text was updated successfully, but these errors were encountered: