I want to have a table, where I want to have entries, which are date ranged. How I normally did it, was to have a table with: someId [not unique] startDate endDate
这三个方面将形成一个主要的关键会议。 我要补充几点限制,以确保日期不会重叠等。
Everything is fine from the database point of view, however when I want to create a domain class in Grails to handle it... well it s more difficult then I thought. Is there a way, to make sure that if I have a relation: ClassA hasOne ClassB [ClassB would be date ranged] and I have entries in ClassB:
Id StartDate EndDate Name
1 2011-11-01 2011-11-05 A
1 2011-11-06 2011-11-10 B
标 题 B号为A,2011-11-03年,然后在2011-11-07年检索物体A。