Boost logo

Boost Users :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2007-04-04 14:54:44


----- Mensaje original -----
De: Christian Henning <chhenning_at_[hidden]>
Fecha: Miércoles, Abril 4, 2007 8:42 pm
Asunto: Re: [Boost-users] [MultiIndex] Resolving foreign keys
Para: boost-users_at_[hidden]

> Thanks JOAQUIN, for your quick answer.

Oh, I happened to be in front of the computer, just like
now :)

> Please see below my comments.
>
> >
> > Your design looks basically correct, but you can have a tighter
> > relationship between order_rows and their associated customer_rows
> > as follows:
>
> I don't think I can do that. All my row objects are coming from an
> ORM. Storing and retrieving an interator to/from a database table, of
> course, doesn't work.

I don't know how much customization your ORM engine allows
for, but can't you save/load order_rows using the _customer_id
key and then internally convert to customer_rows (or any other
class based on it) using customer_table::iterators?

> This way I still need the two containers. What I'm looking for is
> a way to combine the two containers into one of type "order".
> I don't know if this is possible, at all. What's your opinion?

I don't see a way to store both the customer and order objects
in one table, to begin with because they are different objects...
Why do you need an order container, I mean, which modes of use do
you envision that are not realizable witht wo containers, one
for customers and the other for orders?

> Thanks again,
> Christian

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net