#17465: Multiple INSERT RETURNING -------------------------------------+------------------------------------- Reporter: alexandr.s.rus@… | Owner: nobody Type: New feature | Status: new Component: Database layer | Version: 1.4-alpha-1 (models, ORM) | Keywords: db, orm, insert, django Severity: Normal | models Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Postgresql/oracle support multiple returning on insert request, django doesn't.
A have table {{{ CREATE TABLE db_table ( id integer NOT NULL, sid integer, oid integer NOT NULL, name1 character varying(250) NOT NULL, name1 text NOT NULL, ); }}} and want to execute query: {{{ INSERT INTO db_table (name1, name2) values ("value1", "value2") RETURNING id, sid, oid, }}} sid, oid values calculating by trigger before insert, and I need to use its after saving model. Example of definition. {{{ class DbTable(models.Model): oid = models.IntegerField(null=True, return=True) sid = models.IntegerField(null=True, return=True) name1 = modelsCharField(max_length=250) name2 = models.TextFiled() }}} or {{{ class DbTable(models.Model): oid = models.IntegerField(null=True) sid = models.IntegerField(null=True) name1 = modelsCharField(max_length=250) name2 = models.TextFiled() class Meta: returning = ('oid', 'sid') }}} What do you think about whit feature? -- Ticket URL: <https://code.djangoproject.com/ticket/17465> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.