Re: SQL Referential Integrity (WAS: Bulk delete? on django-users)

2006-01-20 Thread Russell Keith-Magee
On 1/20/06, hugo <[EMAIL PROTECTED]> wrote: > BTW: the bulk delete stuff can be made more complete database-wise by > using the delete sql clause to construct deletes against related tables > (and doing updates against related tables). I have no difficulty in seeing how it _can_ be done. However

Re: Ordering by table field connected in OneToOne relation.

2006-01-20 Thread Adrian Holovaty
On 1/20/06, Smudgy <[EMAIL PROTECTED]> wrote: > And how to write something like this expression: > bazs.get_list(order_by=['bardata']) - sort by field of another table. Hi Smudgy, To order by a field in a different table, add the other table's name and a dot, like so: bazs.get_list(order_

Re: SQL Referential Integrity (WAS: Bulk delete? on django-users)

2006-01-20 Thread oggie rob
> You are talking about the admin interface - we are talking about the database > API. The database API doesn't check any permissions, as it's a Python call > done by the programmer, and we still trust the programmer ;-) Yep, I realize that, and wasn't trying to ignore the db changes to support

Re: Ordering by table field connected in OneToOne relation.

2006-01-20 Thread Smudgy
As I read, 'order_in_respect` Is just adds '_order` field. Something like immutable order for local table. :(

Ordering by table field connected in OneToOne relation.

2006-01-20 Thread Smudgy
Hi folks. Please tell me how can I do such thing... I have class Bar(meta.Model): bardata = meta.CharField(maxlength=200) class Baz(meta.Model): bazdata = meta.CharField(maxlength=200) bar = meta.OneToOneField(Bar) bazs.get_list(order_by=['bazdata']) will return me ordered by bazda

Re: Ordering by table field connected in OneToOne relation.

2006-01-20 Thread Julio Nobrega
Perhaps use "order_with_respect_to"? I've never used myself but from the docs looks like it is what you're looking for. http://www.djangoproject.com/documentation/model_api/#meta-options On 1/20/06, Smudgy <[EMAIL PROTECTED]> wrote: > > Hi folks. Please tell me how can I do such thing... > > I

Re: SQL Referential Integrity (WAS: Bulk delete? on django-users)

2006-01-20 Thread hugo
>Doesn't the delete function also checks permissions on all the >referenced rows? I don't think you can implement this in SQL. You are talking about the admin interface - we are talking about the database API. The database API doesn't check any permissions, as it's a Python call done by the progr