If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Aggregation with fastobjects...How do i define that in opt file ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-17-05, 00:17
folima folima is offline
Registered User
 
Join Date: Oct 2005
Posts: 1
Aggregation with fastobjects...How do i define that in opt file ?

Hello,

I have theses java classes:

- Course
<<key>> code : short
name : string
gratingCurricular : set<Period>

- Period
<<key>> numPeriod : short
anything: set<someThing>

* For each course, there is a collection of Periods
* Period can not exists without a Course (the problem is that i 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 = 1
*Course.code = 2 and Period.numPeriod = 1
*Course.code = 3 and Period.numPeriod = 1

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 = 1
*Course.code = 1 and Period.numPeriod = 1

What do i need to do in the opt file ? (I tried to set the hasExtet of Period to false, but it did not work)

My opt file is like this:

[classes\Course]
persistent = true
hasExtent = true
alias = Course
useIndexes = CourseCodeIndex

[indexes\CourseCodeIndex]
class = Course
members = code
unique = true

[classes\Course\members\gratingCurricular]
itemType = Period
depend = true

[classes\br.unit.si.labbd.unidade2.oo.Period]
persistent = true
hasExtent = false
alias = Period
useIndexes = PeriodCodeIndex

[indexes\PeriodCodeIndex]
class = Period
members = numPeriod
unique = true

Fillipe Lima
Brazil
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On