Hi there,
I'm working on a pylons app and an db which deals with the following
entities: computers, computer containers (computer_sets) and rules. It
a firewall management tool. I'm having some troubles dealing with
computer objects, because those computers stored within a computer_set
are not the same objects as those computers not contained within a
computer_set: a stand-alone computer can be in a rule, but a
computer_set computer cannot be in a rule, i.e, only the container is
allowed to be in a rule (I know I know, this is a mess, but I didn't
create the firewall, I'm just programming a management tool :).

I created a DB (with SQLite) and I'm using SQLAlchemy. Thus, I created
the classes Computer, ComputerSet, ComputerSetComputer and Rule and
the corresponding tables
.
Now, in my application, I need to list all those computer objects.
However, when I query the computers table, I get Computer objects and
when I query my computerset_computers table, I get ComputerSetComputer
objects. I would like to get a query object containing all my
computers no matter whether or not they belong to a computer set. This
way, I would be able to slice the query object and do pagination
(using pylons pagination utility). Any ideas? I could change my DB
design, though I cannot change the underlying concepts of a Computer,
a Rule, .etc.

Thanks for your time,
gsandorx :)



--

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


Reply via email to