Aggregation in FastObjects. How to define that in opt file? -
10-19-2005
, 02:10 AM
Hello
I have theses java classes
- Cours
<<key>> code : shor
name : strin
gratingCurricular : set<Period
- Period
<<key>> numPeriod : shor
anything: set<someThing
* For each course, there is a collection of Period
* Period can not exists without a Course (the problem is that
defined on my opt file that Period can exists without a course!
Thats the point... I dont want the Period existing alone
* I want to do this
Course.code = 1 and Period.numPeriod =
*Course.code = 2 and Period.numPeriod =
*Course.code = 3 and Period.numPeriod =
However, i cant do that, cuz FastObjects says that "the key(numPeriod
is duplicated
I would like this kind of error just when inserting like this
Course.code = 1 and Period.numPeriod =
*Course.code = 1 and Period.numPeriod =
What do i need to do in the opt file ? (I tried to set the hasExtet o
Period to false, but it did not work
My opt file is like this
[classes\Course
persistent = tru
hasExtent = tru
alias = Cours
useIndexes = CourseCodeInde
class = Cours
members = cod
unique = tru
[classes\Course\members\gratingCurricular
itemType = Perio
depend = tru
[classes\br.unit.si.labbd.unidade2.oo.Period
persistent = tru
hasExtent = fals
alias = Perio
useIndexes = PeriodCodeInde
[indexes\PeriodCodeIndex
class = Perio
members = numPerio
unique = tru
Fillipe Lim
Brazi |