Re: [Django] #10888: Inserting model with GeometryField as None crashes on Oracle

2009-05-08 Thread Django
#10888: Inserting model with GeometryField as None crashes on Oracle
---+
  Reporter:  jtiai | Owner:  jbronn 
Status:  closed| Milestone:  1.1
 Component:  GIS   |   Version:  SVN
Resolution:  fixed |  Keywords:  oracle gis null
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by mboersma):

 * cc: mboersma (added)

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #10888: Inserting model with GeometryField as None crashes on Oracle

2009-04-24 Thread Django
#10888: Inserting model with GeometryField as None crashes on Oracle
---+
  Reporter:  jtiai | Owner:  jbronn 
Status:  assigned  | Milestone:  1.1
 Component:  GIS   |   Version:  SVN
Resolution:|  Keywords:  oracle gis null
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by jbronn):

  * status:  new => assigned
  * has_patch:  0 => 1
  * stage:  Design decision needed => Accepted
  * needs_tests:  1 => 0
  * milestone:  => 1.1

Comment:

 Alright, the v2 patch has grown on me and I'm +1 now.  Specifically, I
 just re-enabled the existing null geometry tests for Oracle, `.update()`
 queries aren't affected by the problem, and the 'hackishness' only applies
 for Oracle -- which is par for the course.

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #10888: Inserting model with GeometryField as None crashes on Oracle

2009-04-24 Thread Django
#10888: Inserting model with GeometryField as None crashes on Oracle
-+--
  Reporter:  jtiai   | Owner:  jbronn 
Status:  new | Milestone: 
 Component:  GIS |   Version:  SVN
Resolution:  |  Keywords:  oracle gis null
 Stage:  Design decision needed  | Has_patch:  0  
Needs_docs:  0   |   Needs_tests:  1  
Needs_better_patch:  0   |  
-+--
Changes (by jbronn):

  * keywords:  oracle gis => oracle gis null
  * owner:  nobody => jbronn
  * needs_tests:  0 => 1
  * stage:  Unreviewed => Design decision needed

Comment:

 Replying to [comment:2 jtiai]:

 For the rest of us,
 
[http://sourceforge.net/mailarchive/message.php?msg_name=49F050EC.30205%40gmail.com
 this is the thread from the cx_Oracle mailing list].

 > So this is now real problem since you cant have null geometries easily.

 I agree it's a problem.  But should we hack GeoDjango, as my attached
 patch does to just use NULL for the placeholder and omit a parameter? Or
 should we wait until the real underlying problem `cx_Oracle` is solved?

 Until I'm convinced otherwise, I'm -1 on my own patch because (i) it's a
 hack, (ii) needs tests and (iii) it does not address other `NULL` geometry
 related issues, e.g., `UPDATE` queries (`.update(geom_field=None)`).

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #10888: Inserting model with GeometryField as None crashes on Oracle

2009-04-23 Thread Django
#10888: Inserting model with GeometryField as None crashes on Oracle
-+--
  Reporter:  jtiai   | Owner:  nobody
Status:  new | Milestone:
 Component:  GIS |   Version:  SVN   
Resolution:  |  Keywords:  oracle gis
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by jtiai):

 Quote from Anthony Tuininga on cx-oracle-users list:
 > This is expected behavior, unfortunately. Oracle requires a type to be
 > specified and if all you supply is None cx_Oracle has no choice but to
 > assume something. And CHAR seems the most likely to cause the least
 > difficulties. cx_Oracle currently has no way of binding in Oracle
 > object values like MDSYS.SDO_GEOMETRY.


 So this is now real problem since you cant have null geometries easily.

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #10888: Inserting model with GeometryField as None crashes on Oracle

2009-04-23 Thread Django
#10888: Inserting model with GeometryField as None crashes on Oracle
-+--
  Reporter:  jtiai   | Owner:  nobody
Status:  new | Milestone:
 Component:  GIS |   Version:  SVN   
Resolution:  |  Keywords:  oracle gis
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by jtiai):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Further investigation indicates that this is more likely a Bug in
 cx_Oracle than Geodjango framework.

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



[Django] #10888: Inserting model with GeometryField as None crashes on Oracle

2009-04-22 Thread Django
#10888: Inserting model with GeometryField as None crashes on Oracle
+---
 Reporter:  jtiai   |   Owner:  nobody
   Status:  new |   Milestone:
Component:  GIS | Version:  SVN   
 Keywords:  oracle gis  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 myapp/models.py:
 {{{
 from django.contrib.gis.db import models

 class TestModel (models.Model):
 loc = models.GeometryField(null=True, blank=True)

 objects = models.GeoManager()
 }}}

 If I run code:
 {{{
 >>> from myapp.models import TestModel
 >>> t = TestModel()
 >>> t.save()
 Traceback (most recent call last):
   File "", line 1, in 
   File "d:\work\django-trunk\django\db\models\base.py", line 407, in save
 self.save_base(force_insert=force_insert, force_update=force_update)
   File "d:\work\django-trunk\django\db\models\base.py", line 483, in
 save_base
 result = manager._insert(values, return_id=update_pk)
   File "d:\work\django-trunk\django\db\models\manager.py", line 177, in
 _insert
 return insert_query(self.model, values, **kwargs)
   File "d:\work\django-trunk\django\db\models\query.py", line 1037, in
 insert_query
 return query.execute_sql(return_id)
   File "d:\work\django-trunk\django\db\models\sql\subqueries.py", line
 320, in execute_s
 cursor = super(InsertQuery, self).execute_sql(None)
   File "d:\work\django-trunk\django\db\models\sql\query.py", line 2310, in
 execute_sql
 cursor.execute(sql, params)
   File "d:\work\django-trunk\django\db\backends\util.py", line 19, in
 execute
 return self.cursor.execute(sql, params)
   File "d:\work\django-trunk\django\db\backends\oracle\base.py", line 433,
 in execute
 raise e
 DatabaseError: ORA-00932: inconsistent datatypes: expected
 MDSYS.SDO_GEOMETRY got CHAR
 }}}

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---