Can you suggest a valid mapping for the following scenario. Two tables:
CREATE TABLE "ORDER"
(
"ID" NUMBER(20,0) NOT NULL ENABLE,
"STATUS_ID" NVARCHAR2(10,0)
);
CREATE TABLE "STATUS"
(
"ID" NVARCHAR2(10,0) NOT NULL ENABLE,
"DESCRIPTION" NVARCHAR2(250,0)
);
The respective classes are:
public class Order
{
public virtual Id { get; set; }
public virtual Status { get; set; }
}
public class Status
{
public virtual Id { get; set; }
public virtual Description { get; set; }
}
Status table is static table of value object for the property Proposal.Status
and should never be manipulated by code. I want the Order
to always be loaded with Status description and code, i.e. Eager Load Proposal.Status
.
I've read this Ayende's blog post but there is no exactly the same scenario, albeit I believe it's quite common.
Edit: note I'm trying to do this as Component Map
.