Re: [google-appengine] Re: How to create an empty model object

2010-12-27 Thread A. Stevko
I've not tried to port data from python to java either but am comfortable with accessing the raw data objects from big table. Essentially you are dealing with Entity and Property objects. This is the javadoc for the low level api http://code.google.com/appengine/docs/java/javadoc/com/google/appeng

Re: [google-appengine] Re: How to create an empty model object

2010-12-26 Thread Jorge Guberte
I see... to play safe i used string properties populated with JSON values, whenever needed. I'll make some tests with these types, hopefully i'll get it working. Thanks. :) 2010/12/26 Tim Hoffman > Hi > > You can always get the underlying raw entity. I wouldn't have a clue how > you go about tha

Re: [google-appengine] Re: How to create an empty model object

2010-12-26 Thread Tim Hoffman
Hi You can always get the underlying raw entity. I wouldn't have a clue how you go about that in java. But the underlying datastore is the same for both environments. Rgds T -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to th

Re: [google-appengine] Re: How to create an empty model object

2010-12-26 Thread Jorge Guberte
By the way, if i use an Expando or a Polymodel on Python, will i be able to access it using Java? 2010/12/26 Tim Hoffman > Hi > > But you're using db.Model from appengine, not django ;-) > > I suggest you have a read of the Property class documentation on > appengine. > http://code.google.com/a

Re: [google-appengine] Re: How to create an empty model object

2010-12-26 Thread Tim Hoffman
Hi But you're using db.Model from appengine, not django ;-) I suggest you have a read of the Property class documentation on appengine. http://code.google.com/appengine/docs/python/datastore/propertyclass.html It's pretty explicit about the semantics of the "required" parameter Rgds Tim --

Re: [google-appengine] Re: How to create an empty model object

2010-12-26 Thread rahul jain
Ah ok. In django this is possible even for "required=True" parameter (in django required param is called as null though). On Sun, Dec 26, 2010 at 4:20 PM, Tim Hoffman wrote: > When I say required I mean all the properties marked with "required=True" >  everything else can be done later > T > >

Re: [google-appengine] Re: How to create an empty model object

2010-12-26 Thread Tim Hoffman
When I say required I mean all the properties marked with "required=True" everything else can be done later T -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsu

Re: [google-appengine] Re: How to create an empty model object

2010-12-26 Thread Tim Hoffman
Hi You can't db.Model just doesn't work that way. You must supply the required values when you construct the instance. You will note this is also a problem if you add new required properties to existing classes and don't update the entities in the datastore. You will find you can't load them

Re: [google-appengine] Re: How to create an empty model object

2010-12-26 Thread rahul jain
Yup I know i have to set all the required fields, but I would to do it later So if this is the class Class Test(db.Model) prop1 = db.StringProperty() or Class Test(db.Model) prop1 = db.StringProperty(required = True) I would like to create an empty object first test = Test() and

[google-appengine] Re: How to create an empty model object

2010-12-26 Thread Tim Hoffman
HI The error you are getting doesn't reflect the code/model you have posted here, which makes it hard to help you. That error is specifically referring to a Picture property. You will should to supply real code that generates the error rather than something for the posting . As hint though, yo

[google-appengine] Re: How to create an empty model object

2010-12-26 Thread rahul jain
sorry typo test = Test() test.prop1 = val test.put() On Sun, Dec 26, 2010 at 2:26 PM, rj wrote: > For ex: > > I created a model > > Class Test(db.Model) >       prop1 = db.StringProperty() > > Now in one of my classes function > > I would like to do something like this > > test = Test() >