Hi,

I have some questions concerning ordered relations in JDO:

1. Suppose that you have two classes: Point (e.g. a town) and Path,
where the later represents a walk touching some Points.
The relation is many to many, in the sense that a Path touches many
points and a Point could be touched by many Paths.
The relation is also ordered (on Points) in the sense that you want to
know the order in which the points are visited.

I expect to have a class Path with an ordered sturcture (e.g. a Vector)
where each the i-th entry is the Point vistited at i-th step.

In the database, I think I have to store these informations in three
tables (points, paths, paths_points_r), where
paths_points_r has columns path_id (foreing key for id in paths table),
point_id (FK for id in points) an integer column used to describe the
order, e.g.:

PATH_ID    POINT_ID    STEP
1008            999                1
1008            800                2
1008            801                3
...

the question is: is it possible to map such a database structure in JDO
so that the ordered collection used in the class Path satifies
the requirement exposed above ?

2. generally speaking is it possible to have an ordered relation
(implemented in some other way) in JDO ?

3. is it possible to add an "ORDER BY" clause to the SQL statement
produced by JDO to load objects ?

best regards, alessandro.

--
Alessandro Dimauro
Research and Technologies Area
SODALIA s.p.a.
v. Valentina Zambra,1 38100 TRENTO ITALY
phone: +39 0461 316110 fax: +39 0461 316401

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to