jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ераскин Алексей <e...@1c.ru>
Subject Working with JackRabbit OCM
Date Mon, 10 Nov 2008 11:35:31 GMT
Hi guys!

I'm new to JackRabbit and now I'm in process of testing JackRabbit OCM
feature.

I'm stuck with the following issue:

 

I have class Parent: 

 

@Node

class Parent {

            @Field

private String text;

 

            public String getText(){

                        return this.text;

}

 

public void setText(String text){

            this.text = text;

}                       

}

 

and child class:

 

@Node(extend=Parent.class)

class Child {

            

            private String y;

            

            @Override

public String getText(){

            return this.y;

}

 

@Override

public void setText(String text){

            this.y = text;

}

} 

 

and doing following:

 

: 

Child child = new Child();

child.setText("this is child"); // as I understand that code save to "y"
attribute

 

ocm.insert(child);

ocm.save();

 

QueryManager manager = ocm.getQueryManager();

Filter filter = manager.createFilter(AdvTextQuestionData.class);

filter.addLike("text", "%this is child%");

 

Query query = manager.createQuery(filter);

 

Collection t1 = ocm.getObjects(query);

 

:.

 

In result, collection isn't empty because OCM saves to repository to the
"text" property(annotated field in Parent class) following value: "this is
child" Why?

Actually I don't set this field and for me it's strange behavior: maybe
someone knows something about that?

 

Tnx a lot, Eraskin Alexey!

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message