My code here:
Employee Class:
@PersistenceCapable(identityType = 
IdentityType.APPLICATION,detachable="true")
public class Employee implements Serializable {
    private static final long serialVersionUID = 1L;
    
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk",
    value="true")
    private String id;
    @Persistent
    private String ename;
    
    @Persistent
    private String designation;
    @Persistent(mappedBy="parentEmployee",defaultFetchGroup="true")
    private List<Leave> leaves;

    @Persistent
    @Embedded
    private EmployeeManager employeeManager;
}

Leave Class:
@PersistenceCapable(identityType = 
IdentityType.APPLICATION,detachable="true")
public class Leave implements Serializable{
    
    private static final long serialVersionUID = 1L;

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk",
    value="true")
    private String leaveid;
    
    @Persistent
    private String reason;
    
    @Persistent
    private String status;
    
//    @OneToMany(fetch=FetchType.EAGER)
    public Employee parentEmployee;
}

EmployeeManager:

@PersistenceCapable
@EmbeddedOnly
public class EmployeeManager implements Serializable {
    private static final long serialVersionUID = 1L;

    @Persistent
    public String managerId;
}

when i covert the result into String and then send to client then it is 
accepting but when i am sending object it giving me error like:
 Type 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not 
included in the set of types which can be serialized by this 
SerializationPolicy or its Class object could not be loaded. For security 
purposes, this type will not be serialized.: instance = 
[parentemp.client.Employee@1988799, parentemp.client.Employee@ee738e, 
parentemp.client.Employee@e48ee2]

What should i do...???

-- 
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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to