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

Schemaless mode causes error when querying empty db [moved] #81

Closed
lvca opened this issue Dec 10, 2012 · 0 comments
Closed

Schemaless mode causes error when querying empty db [moved] #81

lvca opened this issue Dec 10, 2012 · 0 comments

Comments

@lvca
Copy link
Member

lvca commented Dec 10, 2012

This is Issue 81 moved from a Google Code project.
Added by 2010-07-29T05:26:01.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Defect, Priority-Medium, v0.9.24

Original description

When querying my database before I've actually saved any instances, raises the exception:

com.orientechnologies.orient.core.exception.OCommandExecutionException: Class DOG was not found
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(Unknown Source)

Where I would instead expect an empty result set. 

I imagine this is actually a Schema error (which isn't clear from the message), and is because the schema isn't actually created until an object is saved. IMO I would would like the schema's to be created when I run the 

  db.getEntityManager().registerEntityClasses

command. That way I could safely query it, without anything blowing up...

So I see two problems here:
1. time at which schema is created causes issues
2. error message when querying a type that hasn't been created is not clear.

Perhaps there is another way that I can trigger the automatic build of my schema, without saving an issue?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant