graffitiMSX
graffitiMSX

Reputation: 73

Fluent mapping fails with "Could not determine type..." exception.

In my project I have this mapping:

public virtual string LicensePlate { get; set; }

public VehicleMap()
{
    Table("VEHICLE");

    Id(x => x.LicensePlate, "LICENSE_PLATE");
    ...
}

And when I try to run the app an MappingException is generated, specifying:

    Could not determine type for: nononono.Vehicle, nononono.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, for columns: NHibernate.Mapping.Column(LICENSE_PLATE) 

Could someone point me where I am doing it wrong?

I´ve tried setting the Id to .NotNullable, .GeneratedBy.Assigned() and none helped.

Upvotes: 0

Views: 1415

Answers (1)

graffitiMSX
graffitiMSX

Reputation: 73

Solved the problem, it was on another class that is using the entity incorrectly.

Instead of

    public virtual Vehicle VehicleLicensePlate{ get; set; }

I changed to

    public virtual string VehicleLicensePlate{ get; set; }

Upvotes: 2

Related Questions