still not working... :(

following are my classes...



@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Block implements Serializable {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long block_id;

    @Persistent
    private String block_description;

    @Persistent(defaultFetchGroup = "true")
    private BlockModule block_module;

    ....




@PersistenceCapable(identityType = IdentityType.APPLICATION)
public abstract class BlockModule implements Serializable{

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    protected Key key;

    protected abstract String getTitle(HttpServletRequest req);

    protected abstract String getContent(HttpServletRequest req);
}



@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MyBlock extends BlockModule{

    @Persistent
    private String block_title;

    @Persistent
    private String block_content;

    ...



i am putting *MyBlock*'s instance in *Block*'s instance ...



On Sat, Sep 26, 2009 at 2:05 AM, objectuser <[email protected]> wrote:

>
> Put the myContactInfo property in the default fetch group (search for
> defaultFetchGroup in this group).
>
> On Sep 25, 2:32 pm, Prashant <[email protected]> wrote:
> > Hi,
> >
> > I created a relationship similar to the one given
> > here<
> http://code.google.com/appengine/docs/java/datastore/dataclasses.html...>.
> > Suppose fetched an *Employee*** entity from datastore, now, how to get *
> > Employee*'s *ContactInfo* entity?
> >
> > I tries using *employee.myContactInfo* but it gives nullPointerException.
> >
> > Thanks.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to