0

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.

rae1
  • 6,066
  • 4
  • 27
  • 48
graffitiMSX
  • 73
  • 1
  • 8

1 Answers1

2

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; }
graffitiMSX
  • 73
  • 1
  • 8
  • 1
    I found very helpful, the fact that error for this id column is caused by some other class referencing this class incorrectly. Meaning that this class does not have errors. – deafsheep Oct 09 '13 at 20:32