An important update:

By fiddling around with bulkloader_config.py, I have discovered a
problem: the value being passed to my the export transform is None.
When I swap a place-holding list in for the value, the transform works
perfectly, which leads me to believe that the transforms specified in
my download config file are correct.  The problem seems to be that the
downloader is not passing my list value (children) to my transformer
at all.

The children property of ParentEntity does not show up on any of the
built-in datastore viewers on appengine, either.  I can infer that the
property is there by accessing it in code - that works perfectly, and
the children are all in there as you'd expect.  But when I fetch it
with the bulkdownloader, the property is vanished!

When I download without any download config file, the children
property must be included, because I can re-upload the data and all of
the relationships are preserved.  I must not be specifying the model
correctly in the first place.


How can I cajole the bulk downloader into seeing my children property?


Thanks for any help - I've been working at this for hours and hours.

On Dec 1, 12:06 pm, Riley <rileyl...@gmail.com> wrote:
> I'm trying to follow the hierarchical xml download instructions 
> athttp://bulkloadersample.appspot.com/using the java appengine. This is
> my config file:
>
> transformers:
>
> - kind: ParentEntity
>   connector: simplexml
>   connector_options:
>     xpath_to_nodes: /Parents/Parent
>     style: element_centric
>   property_map:
>     - property: __key__
>       external_name: key
>       export_transform: transform.key_id_or_name_as_string
>
>     - property: name
>       external_name: name
>       # Type: String Stats: 30 properties of this type in this kind.
>
>     - property: children
>       external_name: Children
>       import_transform:
>         transform.list_from_child_node('Children/Child')
>       export_transform:
>         transform.child_node_from_list('Child')
>
> And here is my ParentEntity definition:
>
> package experiment.dataexport;
>
> import java.util.List;
>
> import javax.jdo.annotations.IdGeneratorStrategy;
> import javax.jdo.annotations.PersistenceCapable;
> import javax.jdo.annotations.Persistent;
> import javax.jdo.annotations.PrimaryKey;
>
> import com.google.appengine.api.datastore.Key;
>
> @PersistenceCapable
> public class ParentEntity
> {
>         @PrimaryKey
>         @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>         public Key key;
>
>         @Persistent
>         public String name;
>
>         @Persistent(defaultFetchGroup = "true")
>         public List<ChildEntity> children;
>
> }
>
> But when I run the downloader, I get:
>
> google.appengine.ext.bulkload.bulkloader_errors.ErrorOnTransform:
> Error on trans
> form. Property: children External Name: Children. Code:
> transform.child_node_fro
> m_list('Child') Details: 'NoneType' object is not iterable
>
> Individual XML downloads of ChildEntities and ParentEntities work
> perfectly (without the children property, anyway), but I am
> desperately looking for a way to include the children property as
> nested XML inside of each ParentEntity.  Are there any working
> examples of this anywhere, or does anyone have any suggestions for a
> next step?

-- 
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-j...@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