[appengine-java] Batch load from DataStore?

2010-02-21 Thread Ftaylor
Is this the fastest way to load all of the Elements of a given type from the DataStore? @SuppressWarnings(unchecked) public static final ListPage loadAllPagesFromDataStore() { ListPage pages = new ArrayListPage(); PersistenceManager pm =

[appengine-java] Re: Unsupported method contains while parsing expression:

2010-02-03 Thread Ftaylor
There actually seems to be a mistake in the documentation: // Give me all Employees with lastName equal to Smith or Jones Query query = pm.newQuery(Employee.class, :p.contains(lastName)); query.execute(Arrays.asList(Smith, Jones)); Surely it should be: //

[appengine-java] Re: Unsupported method contains while parsing expression:

2010-02-03 Thread Ftaylor
Wow that mistake in the documentation wasted days of my time. Thankyou datanucleus. On Feb 3, 5:40 pm, Ftaylor finbarrtay...@googlemail.com wrote: There actually seems to be a mistake in the documentation: // Give me all Employees with lastName equal to Smith or Jones     Query query

[appengine-java] Unsupported method contains while parsing expression:

2010-01-28 Thread Ftaylor
Code: Class Page { ListString aliases; ... query = pm.newQuery(Page.class); query.setFilter(:aliases.contains(alias)); query.declareVariables(String alias); ListPage results = (ListPage)query.execute(alias); ... } I want to select Page objects where the aliases

[appengine-java] Help with One to Many owned relationship and Datastore

2010-01-13 Thread Ftaylor
I have a class Page with a variable ListIMG images. @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Page { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private final ListIMG images; ... } My IMG class looks like

[appengine-java] Need Help with One to Many relationships in Datastore

2010-01-13 Thread Ftaylor
I have a class Page with a variable ListIMG images. code @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Page { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private final ListIMG images; ...

[appengine-java] Re: java.lang.NullPointerException cannot be cast to javax.servlet.ServletException

2010-01-07 Thread Ftaylor
This problem still exists. On Dec 16 2009, 9:42 pm, polyurethan vette...@googlemail.com wrote: Hey there, I still get this ClassCastException. When will the JVM be fixed? It's Dec and the issue was raised in Jul. Is there any progress? Thanks, Alexander On Oct 22, 10:13 am, Marc

[appengine-java] Re: File path in App Engine

2010-01-07 Thread Ftaylor
Hello, I have tried this but I always get a java.security.AccessControlException: access denied (java.io.FilePermission /names.txt read) Anyone know how to resolve this? Thanks, Finbarr On Jan 7, 3:32 am, m seleron seler...@gmail.com wrote: Hi, It might be solved by this though is not a

[appengine-java] Re: File path in App Engine

2010-01-07 Thread Ftaylor
I got it to work by just using a File. Didn't change anything, it just seemed to start working of its own accord. Finbarr On Jan 7, 10:46 am, Ftaylor finbarrtay...@googlemail.com wrote: Hello, I have tried this but I always get a java.security.AccessControlException: access denied