Hi all,

I'm a true beginner with GWT and have a simple project.
My intention is to use the RequestFactory for my objects' persistence
and such, on top of vanilla DataNucleus/JDO.

I have the following model:

@PersistenceCapable(..)
A {
@PrimaryKey
Long getPK()
B getB();
void setB(B b);
void setName(String s);
String getName();

}

@PersistenceCapable(..)
B {

@PrimaryKey
Long getPK()
}

@ProxyFor(...)
AProxy extends EntityProxy {

BProxy getB();
String getName();
void setB(Bproxy b);
void setName(String s);

}

@ProxyFor(...)
BProxy extends EntityProxy {
}

I also have proper locators and interfaces such as :

public interface IARequestContext extends RequestContext {

        public Request<A> storeA(AProxy a);

}

In one of my modules I do the following:

           // Previously got the factory and set a private member of
the class this code is executed with a BProxy object selected from a
SuggestionBox
            IARequestContext aContext = factory.getARequestContext();
            AProxy a = aContext.create(AProxy.class);
            Request<Void> request = aContext.storeA(a);
            a = animalContext.edit(a);
            b = animalContext.edit(b);
            a.setName("test");
            a.setB(b);
            request.fire();

It goes well up to the DAO side of my application in which I have the
value of the A object's name set, but not the B object (which is
null). This fires a constraint validation error

I'm sure I'm doing something wrong and wasn't able to see a working
example of that stuff. Could someone please explain to me how it
should be done properly?

Thanks.

--
Julien Cassignol

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to