This project has moved and is read-only. For the latest updates, please go here.

This Code-first entity fails; columns get confused


The item below is incompatible with this MappingAPI. The properites returned confuse the Telemetry_Id and Vehicle_Id columns.
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Asi.Common.Utilities;

namespace Asi.Server.History.DBOs
    public class TelemetryLogEntryDbo
        public TelemetryLogEntryDbo()
            Id = SequentialGuid.NewGuid();

        [Required, Key]
        public Guid Id { get; set; }

        // assuming OneToManyCascadeDeleteConvention is enabled (which it is by default)
        [Required, Index("IX_TelemetryLogEntry_Vehicle_Timestamp", 1)]
        public virtual VehicleDbo Vehicle { get; set; }

        [Required, Index("IX_TelemetryLogEntry_Telemetry")]
        public virtual TelemetryDbo Telemetry { get; set; }

        public virtual LogSourceDbo LogSource { get; set; }

        [Required, Index("IX_TelemetryLogEntry_Vehicle_Timestamp", 2), DateTimeKind(DateTimeKind.Utc)]
        public DateTime Timestamp { get; set; } // TODO: add a separate Timestamp index if we ever pull data without specifying the TelemetryId

        public bool? Degraded { get; set; }
        public string Value { get; set; }

        public bool IsProcessed { get; protected set; }