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

[Entity]
[Table('JOBSQUEUE')]
[EntityAuthorizeScopes(SCOPE_ALLUSERS, EntitySetPermissionsAll)]
[Sequence('SEQ_JOB')]
[Id('FId', TIdGenerator.IdentityOrSequence)]
TJob = class
private
[Column('ID')]
FId: Integer;
[Column('JOBTYPE', [], 25)]
FJobType: String;
[Column('SUBMITTEDBY')]
FSubmittedBy: Integer;
[Column('DATESUBMITTED')]
FDateSubmitted: TDateTime;
[Column('JOBSTATUS')]
FStatus: TJobStatus;
[Column('TIMETAKEN')]
FTimeTaken: Double;
[Column('DATERUN')]
FDateRun: Nullable;
[Column('VISIBILITY')]
FVisibility: TJobVisibility;
[Column('DATA', [], 4096)]
FData: string;
[Column('OUTPUTOPTION', [], 50)]
FOutputOption: string;
[Column('COMPLETEDBY')]
FCompletedBy: Integer;
[Column('OWNEDBY')]
FOwnedBy: Integer;
[Column('TITLE')]
FTitle: String;
[Column('NOTIFYONCOMPLETION')]
FNotifyOnCompletion: Boolean;
[Column('DATECOMPLETED')]
FDateCompleted: Nullable;
public
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;
end;

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.