ops sorry, i accidently clicked ENTER before write a message.
anyway, im having a error when i try to save a entity, starting from the beginning, here's my entity map:
[Entity]
[Table('hsglb_logacesso')]
[Id('Id', TIdGenerator.IdentityOrSequence)]
TLogAcesso = class
strict private
{ Private declarations }
FId : Integer;
FIdUsuario : Integer;
FIdSoftware : Integer;
FData : TDate;
FHora : TTime;
FIP : string;
FUsuario : Proxy<TUsuario>;
FSoftware : Proxy<TSoftware>;
public
{ Public declarations }
[Column('idacesso', [TColumnProp.Unique])]
property Id : Integer read FId write FId;
[Column('idusuario')]
property IdUsuario : Integer read FIdUsuario write FIdUsuario;
[Column('idsoftware')]
property IdSoftware : Integer read FIdSoftware write FIdSoftware;
[Column('data')]
property Data : TDate read FData write FData;
[Column('hora')]
property Hora : TTime read FHora write FHora;
[Column('ip', [], 35)]
property IP : string read FIP write FIP;
[Association([TAssociationProp.Lazy])]
[JoinColumn('idusuario')]
property Usuario : Proxy<TUsuario> read FUsuario write FUsuario;
[Association([TAssociationProp.Lazy])]
[JoinColumn('idsoftware')]
property Software : Proxy<TSoftware> read FSoftware write FSoftware;
end;
and where's the core i save:
ANew := TLogAcesso.Create();
ANew.IdUsuario := Self.FUsuario.Id;
ANew.IdSoftware := Self.FSoftware.Id;
ANew.Data := Now();
ANew.Hora := Now();
ANew.IP := ModuleResource.JvComputerInfoEx.Identification.IPAddress;
and here's is the error it gives:
EMysqlException with message: Incorrect time value: '1008973:38:43' for column 'hora' at row 1
a few extra informations, im using:
aurelius: lastest version
unidac: 5.0.1 25-Apr-13
mysql server: 5.1
so, any ideia of what it could be?
thx
Don't use a TTime field. You can just use a TDateTime and save the time part in it.
thx, i couldn't find the documentation the compatible datatypes i guessed TTime was one of the supported one.