Hi there!

As far as I've read in the Django wiki this is a very common
situation, yet I can't get it right....
I've inherited a legacy database which I'm slowly trying to model in
Django to benefit from the free Admin site. As long as I'm here I'm
also trying to learn something ;)

My situation is as follows: I have two tables, 'Legislation' and
'Revoked'. The first contains data about a given legislation (name,
date, etc....) while the later only contains two attributes
(id_revoked, id_legislation) both of which are FK's to 'Legislation'.

The ER stands something like this:
 
----------------------
 
| Revoked           |
 
----------------------
|---------------------|
| Legislation        |
|-------------------------| id_revoked       |
-----------------------
|                               |                          |
| id
|-----------------------|-------------------------| id_legislation   |
| name
|
----------------------
| date                   |
-----------------------


If a Legislation appears in the Revoked relation by id_revoked it
simply means it is Revoked by id_legislation. If on the contrary it is
referenced by id_legislation it means it revokes id_revoked.

I'm trying to model this case in Django but I'm not getting it. Can
you help me?
Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en.

Reply via email to