0

Is this possible? We have our apps set up to use the table "videos" but lower case. I don't see where this query is coming from but the oracle trace shows that this is the only error in the trace.

SELECT * FROM "VIDEOS"
gives ORA-00942

In the application, this appears to be coming from an INSERT though.

Is there something I'm not aware of that could be happening here? I don't see a toUpper or SELECT in caps anywhere. Is this maybe in jdbc land somewhere or oracle internal? I hid the sys operations when processing the traces.

Data Store Update Failure (ORA-00942: table or view does not exist

EDIT: I suspect there is a bug in the KeyedEntity trait or autoincrement for oracle. Probably not found before because nobody uses lowercase table names :)

JasonG
  • 5,794
  • 4
  • 39
  • 67
  • If you enclosed the table name in double quotes upon creation, you made the table name case sensitive. It means, that every time you refer to that table you should specify its name exactly exactly as you did when you created it. Otherwise you will get `ORA-00942` error. – Nick Krasnov Sep 24 '13 at 19:30
  • right but there is no code anywhere that I can find that's trying to select from "VIDEOS". All lower case in the codebase. – JasonG Sep 24 '13 at 19:39
  • 1
    What is the output if you call `.statement` on your Squeryl `Query` statement? Is that uppercase too? – jcern Sep 25 '13 at 01:50
  • There isn't a select anywhere in the code - it's popping up somewhere when using autoincrement only. Ah well - that's okay. I just made an extra query for sequence.nextval. A little dirty but it's not a performance critical process. – JasonG Sep 25 '13 at 12:18

1 Answers1

0

You say it's all lower case in the codebase, but is it all enclosed in double-quotes? I.e.,

SELECT * FROM videos;

is not the same as

SELECT * FROM "videos";
DCookie
  • 42,630
  • 11
  • 83
  • 92
  • But it's getting generated like that - we shouldn't be using lowercase tablenames anyway. But we're feeding in "\"videos\"" everywhere. It's only appearing when autoincrement and/or keyedentity - I'm leaning toward the latter now. I'd probably try to trace it down in the squeryl source and make a pull request but I don't think they're maintaining it. – JasonG Sep 25 '13 at 12:21
  • There haven't been a lot of updates to Squeryl lately, but it's actively maintained. If you check the mailing list you'll see that either Max or I will get back to anyone with an issue pretty promptly. If you want to take the discussion over there, and are willing to put together a reproducible test case I'd be happy to look it over. – Dave Whittaker Sep 25 '13 at 13:54
  • I submitted a patch a month-two ago and it was merged:) – VasiliNovikov Sep 25 '13 at 16:05