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

Inheritance mapping not done automatically when in schema-less mode of the document database [moved] #279

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

Comments

@lvca
Copy link
Member

lvca commented Dec 10, 2012

This is Issue 279 moved from a Google Code project.
Added by 2011-03-24T18:16:08.000Z by emailmat...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Defect, Priority-Medium, v1.0

Original description

<b>What steps will reproduce the problem?</b>
1. Create 2 classes, one extending the other.
2. Create a object database connection.
3. Save an instance of both classes to the database.
4. Query all records of the base class of the 2 creates classes.

<code>public class Main
{
    public static void main(String[] args)
    {
        ODatabaseObject db = new ODatabaseObjectTx(&quot;local:/opt/orientdb-1.0rc1-SNAPSHOT/databases/test&quot;).open(&quot;admin&quot;, &quot;admin&quot;);
        db.getEntityManager().registerEntityClasses(&quot;orient&quot;);
        db.save(new A());
        db.save(new B());
        List<A> items = db.query(new OSQLSynchQuery<A>(&quot;select from A&quot;));
        System.out.println(items.size());
        db.close();
    }
}</code>

Where B is extending A.

<b>What is the expected output? What do you see instead?</b>
I expected to see a count of 2, but saw 1. The inheritance mapping was not done automatically, which I would expect in schema-less mode.

<b>Please use labels and text to provide additional information.</b>
inheritance, schema-less, object database
@lvca lvca closed this as completed Dec 10, 2012
tglman pushed a commit that referenced this issue Feb 21, 2024
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