mapped to more than one database columns?

When I run my app I now get this error raised

Property "GA.Entities.JobQueue.TJob.FStatus" is mapped to more than one database columns.

Yet it is declared only once in the entity

[EntityAuthorizeScopes(SCOPE_ALLUSERS, EntitySetPermissionsAll)]
[Id('FId', TIdGenerator.IdentityOrSequence)]
TJob = class
FId: Integer;
[Column('JOBTYPE', [], 25)]
FJobType: String;
FSubmittedBy: Integer;
FDateSubmitted: TDateTime;
FStatus: TJobStatus;
FTimeTaken: Double;
FDateRun: Nullable;
FVisibility: TJobVisibility;
[Column('DATA', [], 4096)]
FData: string;
[Column('OUTPUTOPTION', [], 50)]
FOutputOption: string;
FCompletedBy: Integer;
FOwnedBy: Integer;
FTitle: String;
FNotifyOnCompletion: Boolean;
FDateCompleted: Nullable;
procedure Assign(Source: TObject);
property Id: Integer read FId write FId;
property JobType: String read FJobType write FJobType;
property Title: String read FTitle write FTitle;
property Visibility: TJobVisibility read FVisibility write FVisibility;
property SubmittedBy: Integer read FSubmittedBy write FSubmittedBy;
property DateSubmitted: TDateTime read FDateSubmitted write FDateSubmitted;
property OwnedBy: Integer read FOwnedBy write FOwnedBy;
property CompletedBy: Integer read FCompletedBy write FCompletedBy;
property DateRun: Nullable read FDateRun write FDateRun;
property DateCompleted: Nullable read FDateCompleted write FDateCompleted;
property TimeTaken: Double read FTimeTaken write FTimeTaken;
property Status: TJobStatus read FStatus write FStatus;
property Data: string read FData write FData;
property NotifyOncompletion: Boolean read FNotifyOnCompletion write FNotifyOnCompletion;
property OutputOption: string read FOutputOption write FOutputOption;

I had another value to TJobStatus and extended the column in the database to accomodate it.

I've cleaned and reloaded the project in Delphi.

can anyone spot anything I can't?

I have sorted this now, but have left it here as I will probably do the same thing again at some point :joy:

What I had done is add the new status to the Enumeration Attribute values, but didn't add it to the actual Type definition :man_facepalming:

Anyway, all happy now.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.