Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORA-00932: inconsistent datatypes: expected MDSYS.SDO_GEOMETRY got CHAR when inserting NULL for geometric columns #310

Closed
nathanvda opened this issue Jun 20, 2013 · 2 comments · Fixed by #311

Comments

@nathanvda
Copy link

Hi there, I am porting a rails project from rails 2.3.x to rails 3.2.x. We are using spatial oracle, but the rails project itself is not inserting SDO_GEOMETRY. For now we use either stored procedures or specific gis software to create and update new spatial data --the rails process just handles the administrative data.

So I want to just create a new row with the SDO_GEOMETRY set to zero, which for the moment is not possible. Somehow the default behaviour converts the NULL value to a string? (I deduced that from the error).

I did see #268 but for now I would prefer a solution which would make sure there are no errors, and later when I want to manage SDO_GEOMETRY, create a gem that will handle it completely correctly (and using rgeo).

In #268 I did see @kubo refering to a gist, so I'll see if I can extract something minimal that could help (I don't quite understand the gist just yet 😄)

@nathanvda
Copy link
Author

The gist does not work, since for the nil case, it just does the same as super. Looking further :)

@nathanvda
Copy link
Author

For now I was able to find an easy solution, by using ignore_table_columns, since I am not inserting any data into the geometry column for now.

In a later stage in my current project I will definitely need to create geometries from within the rails process, and at that time I will dive into the outdated spatial-adapter fork, and write an rgeo oracle adapter. Then I will be able to integrate @kubo's gist correctly 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant