Hi,
  I have a class as shown below in my Google App engine datastore. I
need to define the size limit for the fields, like name field i want
to set a particular size-limit of 5. I tried to put @Column(length=5)
but still it is accepting names whose length is more than that. I
tried to create package.jdo and define things in that but its not
reading
from it. Doesn't Google App engine support package.jdo(code is given
below)? None of the documentation given by Google specifies anything
related to it. How can I handle the size?

//POJO code-------------
public class UserDetails {
        @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key user_id;
        @Persistent
        @Column(length=5)
    private String Name;
        @Persistent
    private String login_id;
        @Persistent
    private String userRole;
        @Persistent
    private String userPassword;
        @Persistent
    private Date creationDate;
//.............


//package.jdo code......

<jdo>
        <package name="com.sony.prototype.model">
                <class name="UserDetails" table="User_Details">
                        <field name="user_id" primary-key="true">
                        <column name="user_id"/>
                    </field>
                    <field name="Name">
                        <column name="Name" length="5"/>
                    </field>

                    <field name="login_id">
                        <column name="login_id"/>
                    </field>
                    <field name="userRole">
                        <column name="userRole"/>
                    </field>
                    <field name="userPassword">
                        <column name="userPassword"/>
                    </field>
                   <field name="creationDate">
                        <column name="creationDate"/>
                    </field>

                </class>
        </package>
</jdo>



-- 
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