I am having problems with using RequestFactory with Datanucleus to persist data into children of entity children. The situation is this: I've got a parent entity, a child entity, and a child's child entity. I have managed to use RequestFactory to persist data into both the parent and the child. However, I am running into difficulties when trying to insert data into the child's child entity. I couldn't find a proper tutorial for multiple entity inheritance anywhere, so I'm not sure if my code is properly set up. My program compiles and runs fine, up to the point where it should persist data into the db. That part does not work and calls the onFailure method with the following console output:
WARNING: Meta-data warning for org.persistence.Address.city: The datastore does not support joins and therefore cannot honor requests to eagerly load related objects. The field will be fetched lazily on first access. You can modify this warning by setting the datanucleus.appengine.ignorableMetaDataBehavior property in your config. A value of NONE will silence the warning. A value of ERROR will turn the warning into an exception.
Feb 7, 2013 6:14:22 PM com.google.apphosting.utils.servlet.TransactionCleanupFilter handleAbandonedTxns
WARNING: Request completed without committing or rolling back transaction with id 0. Transaction will be rolled back.
Has anyone encountered this problem and can anyone point me to a proper place to learn how to achieve persisting into children of children entities with RequestFactory? Also, I need confirmation that my entity relations are properly set up:
Parent entity: User
//primary key of address child
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = Address.class)
@PrimaryKeyJoinColumn(name = "T_USER_id", referencedColumnName = "id")
@Basic
private List<Address> businessAddress;
Child entity: Address
//primary key of city child
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = City.class, optional = false)
@PrimaryKeyJoinColumn(name = "T_ADDRESS_id", referencedColumnName = "id")
@Basic
private City city;
Child of child entity: City
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment