Beginner |
 |
Joined: Mon Aug 15, 2005 11:50 pm Posts: 22
|
I am having difficulties knowing where to start on the following:
I have an entity Building. Building has a date field.
I want to utilise the date field to find its relation to another entity, BuildingPriceIndex using the date as a in range query relationship.
For example, If Building.buildingDate has a value of '3/1/07' it will have a 1-1 relationship to a BuildingPriceIndex which has a dateStart of 1/1/07 and dateEnd of 31/1/07.
How should I structure my Building mapping file to join the BuildingPriceIndex to Building based on buildingDate between a date range. Since Building has no fk to BuildingPriceIndex.
I initially had the entity querying the service layer to retrieve the BuildingPriceIndex but my entities shouldn't really be talking to the service layer....
class Building
{
int buildingId
DateTime buildingDate
BuildingPriceIndex bpi
}
class BuildingPriceIndex
{
int buildingPriceIndexId
DateTime dateStart
DateTime dateEnd
}
|
|