Django

Code

Ticket #10109 (closed: fixed)

Opened 1 year ago

Last modified 3 months ago

Move raw sql from models.fields.related to models.sql.query

Reported by: david Assigned to: Alex
Milestone: 1.2 Component: Database layer (models, ORM)
Version: 1.0 Keywords:
Cc: artagnon, jezdez, arikon Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Otherwise backends which do not rely on sql can't use many-to-many relations as discussed here: http://groups.google.com/group/django-developers/browse_thread/thread/c3cd2eb4f63aed5d/6e8de9e05424d18f (do not care with messages from people that doesn't know how to use reply-to on mailing-lists)

Now let's discuss around the proposed patch.

Attachments

patch_django_10109.20090123.diff (14.3 kB) - added by david on 01/23/09 11:33:47.
Initial patch, without any documentation nor tests, design discussion for now
patch_django_10109.20090422.diff (14.7 kB) - added by david on 04/21/09 20:56:58.
Update patch against r10618
m2m-refactor.r11683.diff (58.8 kB) - added by russellm on 10/30/09 02:51:32.
RC1 of the m2m refactor stemming from Alex's GSoC 2009 project
m2m-refactor.r11683.2.diff (61.6 kB) - added by russellm on 10/30/09 22:59:40.
RC2 of m2m-refactor patch. Incorporates fix for abstract base classes.
m2m-refactor.r11705.diff (61.7 kB) - added by russellm on 11/02/09 09:14:37.
RC3 for m2m-refactor patch. Incorporates unique_together fix.

Change History

01/23/09 11:33:47 changed by david

  • attachment patch_django_10109.20090123.diff added.

Initial patch, without any documentation nor tests, design discussion for now

01/23/09 11:41:45 changed by david

  • needs_better_patch changed.
  • needs_tests set to 1.
  • needs_docs set to 1.

02/27/09 13:41:40 changed by jacob

  • stage changed from Unreviewed to Accepted.

This needs to happen as part of a bigger refactor of related fields.

03/19/09 00:57:58 changed by artagnon

  • cc set to artagnon.

04/21/09 12:11:26 changed by Alex

Noting here that this(or some variant thereof) is going to be a blocker on having many to many fields work correctly with Multiple Database support(GSOC).

04/21/09 20:56:58 changed by david

  • attachment patch_django_10109.20090422.diff added.

Update patch against r10618

05/07/09 08:55:29 changed by david

  • owner changed from david to Alex.

For the record:

[15:43]  <Alex_Gaynor> david`bgk: bitchin!  
There's probably no time for that to go in before 1.1.  
But if you remind me I'll bug the shit out of jacobkm 
and russ to get it in fterwords

I'll ping you anyway.

08/28/09 07:03:53 changed by russellm

See #11795 for a related request that this ticket may make possible.

09/28/09 16:40:09 changed by jezdez

  • cc changed from artagnon to artagnon, jezdez.

10/01/09 15:16:29 changed by arikon

  • cc changed from artagnon, jezdez to artagnon, jezdez, arikon.

10/30/09 02:51:32 changed by russellm

  • attachment m2m-refactor.r11683.diff added.

RC1 of the m2m refactor stemming from Alex's GSoC 2009 project

10/30/09 03:34:05 changed by russellm

The patch I have just uploaded is ready for trunk. The code is also available on Alex Gaynor's github branch

My intention is to commit this mid next week. Feedback is welcome.

10/30/09 03:34:31 changed by russellm

  • needs_docs deleted.
  • needs_tests deleted.
  • milestone set to 1.2.

10/30/09 22:59:40 changed by russellm

  • attachment m2m-refactor.r11683.2.diff added.

RC2 of m2m-refactor patch. Incorporates fix for abstract base classes.

11/01/09 09:28:39 changed by emulbreh

Another small issue: Intermediary models should have 'unique_together': (from_, to), to match the old behaviour.

11/02/09 09:14:37 changed by russellm

  • attachment m2m-refactor.r11705.diff added.

RC3 for m2m-refactor patch. Incorporates unique_together fix.

11/03/09 08:02:50 changed by russellm

  • status changed from new to closed.
  • resolution set to fixed.

(In [11710]) Fixed #10109 -- Removed the use of raw SQL in many-to-many fields by introducing an autogenerated through model.

This is the first part of Alex Gaynor's GSoC project to add Multi-db support to Django.


Add/Change #10109 (Move raw sql from models.fields.related to models.sql.query)




Change Properties
Action