I suppose you can always switch to the raw SQL queries instead of using 
Django's ORM. 

You have to type more, but it will be more efficient if you know how to 
code SQL for your DB.

On Thursday, 19 June 2014 23:49:52 UTC+2, G Z wrote:
>
> I have a multi-level database that uses concatenated foreign keys as 
> primary keys for tables. 
>
> For example we have three tables
> VMS
> VM_LICENSE
> LICENSES
>
>
> VMS has
> name 
> license_id <- foreign key
> vm_id <-primary key
>
>
> vm_licenses has two concatenated fkeys to for a primary key of:
> licenses_id fkey to licenses
> vm_id   fkey to vms
>
>
> licenses has:
>
> license_id pkey
> product_code
>
>
> how do I deal with concatenated foreign keys to form a primary key how do 
> i even register that in the models.py? 
> The reason I ask is because one i need to register them and the second is 
> how do i save forms based on a concatinated pk
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/82714287-1a90-43de-adb5-0d6b8f3ca8f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to