Hi Colin,

Sorry for taking so long to get back to you, but I somehow managed to break my foot over the weekend!

Anyway, the full function is as follows:

public PageableList<Person> getByPage(int pageNo, int pageSize) {
System.out.println(conn.getDb().getEntityManager().getRegisteredEntities());
        List<Person> queryResult = conn.getDb().query(
new OSQLSynchQuery<Person>(String.format("select * from Person skip %d limit %d",
                        pageNo*pageSize, pageSize))
                    .setFetchPlan("*:1"));
        List<Person> cleanedResult = new ArrayList<Person>();

        for (Person p: queryResult) {
            cleanedResult.add(Person.makeCopy(p));
        }

return new PageableList<Person>(pageNo, pageSize, getCount(), cleanedResult);
    }

The Person (model) is registered as per my earlier mail, but it still produces a fatal error that it isn't registered!

Thanks

-- Paul

On 17/04/2015 18:35, Colin wrote:
Hi Paul,

Could you describe for us what you're doing when you receive this error?

Thanks,

-Colin

Orient Technologies

The Company behind OrientDB



On Friday, April 17, 2015 at 2:44:42 AM UTC-5, Paul Scott wrote:

    Hi,

    I am getting the error:

    SEVERE: Unable to fetch page
    com.orientechnologies.orient.core.exception.OSerializationException:
    Type person cannot be serialized because is not part of registered
    entities. To fix this error register this class

    I have registered the class (as far as I can tell) as a call to

    System.out.println(conn.getDb().getEntityManager().getRegisteredEntities());


    produces

    [ [snip], class com.dstvdm.labs.darwin.model.Person]

    Is there something I am missing here?

    Any help would be appreciated!

    -- Paul

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--

--- You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to