I have two tables Order, OrderStatus . Order has OrderId (pk), OrderStatusId (fk) and so on…
OrderStatus has two columns OrderStatusId (pk) and StatuCcode. The tables are normalised so that there is a proper foreign key constraint on OrderStatusId column. However to me OrderStatus is just a value object all I will ever use it for is to read the description only. Can I keep the data model as it is now and map Orderstatus as value object in NHibernate?
I have two tables Order , OrderStatus . Order has OrderId (pk), OrderStatusId (fk)
Share
If it were a value object, it wouldn’t have an Id.
It’s an entity, map it as such.