[appengine-java] Re: Persisting class hierarchies

2009-12-03 Thread leszek
Inheritance and class hierarchy is very important in OOP but it has a different meaning when it comes to persistence. You cannot take advantage of OOP concepts like: encapsulation, polymorphic etc. So, as Ikai pointed above, you can run into over-engineering trap going that way. In my opinion the b

[appengine-java] Re: Point to application database with JUnit Test

2009-12-03 Thread leszek
Judging from: http://code.google.com/intl/pl/appengine/docs/java/howto/unittesting.html --- if every test starts with a clean datastore --- it clears local datastore every time - so it works as expected. But may be after removing line: datastoreService.clearProfiles();

[appengine-java] Re: jdo on app engine

2009-12-02 Thread leszek
If you use "pure" long primary key than it can impact transactional mechanism which is related to so called "entity groups" identified by primary key values. So before designing your entity classes read through: http://code.google.com/intl/pl/appengine/docs/java/datastore/transactions.html -- Y

[appengine-java] Re: Point to application database with JUnit Test

2009-12-02 Thread leszek
This type of tests works for me without any problem. Could you provide more details and what you mean exactly by "system was unable to read it" ? -- 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

[appengine-java] Re: Any Sample Authentication Examples using GWT-App Engine

2009-11-25 Thread leszek
http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ -- 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

[appengine-java] Re: Is there a recommended way to differentiate between production and dev GAE environments?

2009-11-23 Thread leszek
Follow that thread: http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/8145f547cbaff99e/453847dda0217e71?q=#453847dda0217e71 -- 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 t

[appengine-java] Re: Querying sub objects with JDOQL in GAE/J

2009-11-17 Thread leszek
It is not supported in Google App Engine JPA/JDO http://code.google.com/intl/pl/appengine/docs/java/datastore/usingjdo.html#Unsupported_Features_of_JDO "Join" queries. You cannot use a field of a child entity in a filter when performing a query on the parent kind. Note that you c

[appengine-java] Re: How to add new module?

2009-11-09 Thread leszek
It looks like GWT (not Google App Engine) problem: http://code.google.com/intl/pl/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideModules --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine

[appengine-java] Re: Which datastore exceptions are appropriate for Re-try

2009-11-09 Thread leszek
http://code.google.com/intl/pl/appengine/docs/java/datastore/transactions.html for (int i = 0; i < NUM_RETRIES; i++) { pm.currentTransaction().begin(); ClubMembers members = pm.getObjectById(ClubMembers.class, "k12345"); members.in

[appengine-java] Re: GWT Vs JQuery

2009-11-06 Thread leszek
In Polish language it is called a discussion "o wyższości Swiąt Wielkiej Nocy nad Swiętami Bożego Narodzenia".- in English it is a discussion on superiority Christmas over Easter or vice versa or simply discussion on nothing. So it is like discussion on what is better: GWT, JQuery, Dojo, Ext- Gwt,

[appengine-java] Re: Querying for entities by filtering by key

2009-11-06 Thread leszek
> @Persistent(mappedBy = "A") Judging from: http://www.jpox.org/docs/1_2/jdo/annotations.html -- mappedByString Field in other class when the relation is bidirectional to signify the owner of the relation -- 'mappedBy' does not make any sense outside relationships. Pro

[appengine-java] Re: What defines a "single transaction" in JDO?

2009-11-04 Thread leszek
Sequence: tx.begin(); ,,, persist Entity group A tx.commit(); tx.begin(); .. persist Entity group B tx.commit(); works without any problem as designed. You have to provide more details to tell something. --~--~-~--~~~---~--~~ You received this message because yo

[appengine-java] Re: thanking uuuuuuuuu

2009-11-04 Thread leszek
http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/b2d502bc03c83155# --~--~-~--~~~---~--~~ 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 googl

[appengine-java] Re: JDO Best Practices

2009-11-03 Thread leszek
DM - http://vike.googlecode.com/svn/trunk/vike/src/br/com/ximp/vike/server... Judging from above you don't use JPO but low level API. But your entity class (Actor) is dressed with JDO annotations. I don't know what will happen if entity dressed with JPA annotiation and beautified by JDO enhancer

[appengine-java] Re: Using the Synchronous Interface

2009-11-02 Thread leszek
http://groups.google.com/group/Google-Web-Toolkit?pli=1 But what do you want to achieve ? To call : SearchResult res = dataService.searchSomething(...) instead of dataServiceAsync.searchSomething(... new CallBack()); ? Rather impossible, you would block the browser until RPC returns. --~--~---

[appengine-java] Re: Persist HashMap with sdk1.2.2 ?

2009-10-29 Thread leszek
http://code.google.com/intl/pl/appengine/docs/java/datastore/dataclasses.html#Collections --~--~-~--~~~---~--~~ 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-java] Re: Deploy webservices

2009-10-29 Thread leszek
Follow this thread: http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/e29a06508797545c/b456c04790f20181?lnk=gst&q=webservice#b456c04790f20181 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Go

[appengine-java] Re: JDO Unowned Relationship Issue

2009-10-29 Thread leszek
You have now: employee.addComputer(computer); pm.close(); Replace with: employee.addComputer(computer); pm.makePersistent(employee); pm.close(); You update entity but don't persist it again. Also replace: @Persistent public Set computerKeys = new HashSet(); with:

[appengine-java] Re: Need help on how to enhance the data classes with netbeans

2009-10-29 Thread leszek
Thanks, I will try. I'm using eclipse only because of this Google plugin, I'm rather fan of NetBeans. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send ema

[appengine-java] Re: Not sure I'm using Memcache properly

2009-10-29 Thread leszek
You mean Google App Engine/J implementation of this ? http://code.google.com/intl/pl/appengine/docs/python/urlfetch/asynchronousrequests.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Jav

[appengine-java] Re: JDO and Sets and Quotas

2009-10-28 Thread leszek
But you can accomplish it in more simple way. It is many-to-many relationships. Simple have entity USER and ITEM and USER-ITEM entity keeping both keys. If there exists USER-ITEM entity having both keys than user read this item, if not than opposite. This way you can avoid this limitation. --~--~-

[appengine-java] Re: Weird Life Cycle of Servlet in GAE

2009-10-28 Thread leszek
It is a clustered environment. So it is expected that the next request is run on a different machine, JVM and all statics are reinitialized. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java"

[appengine-java] Re: Weird Life Cycle of Servlet in GAE

2009-10-28 Thread leszek
Is it production or local (development) environment ? --~--~-~--~~~---~--~~ 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-java@googlegroups.com To

[appengine-java] Re: Need help on how to enhance the data classes with netbeans

2009-10-28 Thread leszek
I'm using NetBeans but only for GWT application. I don't know if there is anybody who uses NetBeans for Google App Engine application. May be ask the question here: https://gwt4nb.dev.java.net/ if are there any plans to extend existing plugin and support also Google App Engine. --~--~-~

[appengine-java] Re: Concurrency In Transaction

2009-10-28 Thread leszek
http://code.google.com/intl/pl/appengine/docs/java/datastore/transactions.html Look at the next code snippet === for (int i = 0; i < NUM_RETRIES; i++) { pm.currentTransaction().begin(); ClubMembers members = pm.getObjectById(ClubMembers.class, "k12345");

[appengine-java] Re: Not sure I'm using Memcache properly

2009-10-28 Thread leszek
It looks ok, the only problem I can see that something can happen between storing book in cache and getting book from cache. Scenario like: 1) fetch book from Amazon and store in cache. 2) book expires in Amazon (or any other event happens) 3) next request - get data from cache - you return statu

[appengine-java] Re: Key and KeyFactory - privacy concern related

2009-10-27 Thread leszek
You can also "normalize" your scheme a little bit and avoid using email as primary key.. Instead of using: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class UserAndSomething { @PrimaryKey private Key email; ... more stuff .. } use @PersistenceCapable(iden

[appengine-java] Re: Performance difference between local dev server and App Engine

2009-10-26 Thread leszek
The development server contains local implementation of low-level datastore operations. It is something kept in memory and from time to time persisted to disk. In production environment (app engine) the low- level engine is Google's Big Table. So you cannot compare performance between local and pr

[appengine-java] Re: Storing and managing a collection of objects in a HttpSession.

2009-10-26 Thread leszek
http://code.google.com/intl/pl/appengine/docs/java/config/appconfig.html === App Engine includes an implementation of sessions, using the servlet session interface. The implementation uses the App Engine datastore and memcache to store session data. This feature is off by default

[appengine-java] Re: SimpleDS: an alternative for Datastore persistence

2009-10-26 Thread leszek
Thanks for javadoc. Several months ago I ported my application to Google App Engine and reported my adventures here: http://hoteljavaopensource.blogspot.com/2009/09/migration-to-google-app-engine.html Finally I realized that I reduced my JPA layer to basic CRUD operations and simple query. To kee

[appengine-java] Re: SimpleDS: an alternative for Datastore persistence

2009-10-23 Thread leszek
Do you have some more doc/java doc ? I was browsing through your page and found nothing. As far as I caught you implemented simple set of CRUD operations on items and simple query mechanism. Am I right ? The decision to get rid of relationships is very sound because this GAE/J implementation is ra

[appengine-java] Re: Problem with saving parent entity

2009-10-23 Thread leszek
It looks for me that you mix JPA annotations (OneToMany, Entity, Id) with JDO api. - using PersistenceManager. It is hard to say how it behaves and disentangle that issue. But if you want to have bi-directional ownership - in News entity Source instance - follow this thread, it could shed some li

[appengine-java] Re: primary key portability

2009-10-23 Thread leszek
I ported my Open Source EJB3/JPA application to Google App Engine many months ago and almost at the beginning it was obvious that I had to split my entity classes to two versions: Google App Engine and non Google App Engine. Impossible to achieve 100% source compatibility. "Primary key not compati

[appengine-java] Re: Possible to Add Child to Owned One to Many Relationship Without Loading All Children?

2009-10-22 Thread leszek
Wow ! That's the stuff, thanks. --~--~-~--~~~---~--~~ 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-java@googlegroups.com To unsubscribe from this

[appengine-java] Re: Can fliter the child class based on parent class's property?

2009-10-21 Thread leszek
It is not possible, your query filter should contain only 'direct" attributes of the class. if you want to run query based on "class number" you need to have to duplicate this property from Classroom to Student. But I don't understand your problem. If you have 'one" to 'many' relationship and wan

[appengine-java] Re: Servelts versus JSPS

2009-10-21 Thread leszek
JSP is nothing more than servlet code woven with html and some tags to make generating html pages more easy. Almost everything you can do in sevlet code you can do also in JSP page. So it is a design decision what logic should be kept in JSP and what logic should tackled in a classic servlet code.

[appengine-java] Re: Possible to Add Child to Owned One to Many Relationship Without Loading All Children?

2009-10-21 Thread leszek
You hit the nail on the head. As far as I know there is nothing like "sequence" in Google App Engine. Either you need to have another entity with a counter and increase it in transactional way. Or you can use memcache. http://code.google.com/intl/pl/appengine/docs/java/javadoc/com/google/appengin

[appengine-java] Re: Possible to Add Child to Owned One to Many Relationship Without Loading All Children?

2009-10-20 Thread leszek
Look at the code snippet below: // entity class @PersistenceCapable(identityType = IdentityType.APPLICATION) public class ChildEnt { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) //@Extension(vendorName="datanucleus", key="gae.encoded- pk",value="true") p

[appengine-java] Re: Possible to Add Child to Owned One to Many Relationship Without Loading All Children?

2009-10-20 Thread leszek
I'm afraid that it is not possible. But if the purpose of your relationship is only to manage child class in a transactional way you don't need to keep them as a part of child relationship. Simply use Key type and set 'parent' part of the "child' key being the same and you can manage them in the

[appengine-java] Re: Selecting more than 1000 rows ?

2009-10-20 Thread leszek
"1000" is a hard limitation on every query. So if you have 5000 entitties and use range 999-1500 you will get only one record. The only way is to iterate through entities using "JDO extend". --~--~-~--~~~---~--~~ You received this message because you are subscribed

[appengine-java] Re: Caching using static fields

2009-10-19 Thread leszek
What about using memcache as keeping "cache version counter" ? When update is needed than this counter is increased. Every requests keeps local number and at the beginning compare local counter against memcache counter. If not equal than refresh local cache and local cache number. If memcache coun

[appengine-java] Re: Regarding JDOQL

2009-09-25 Thread leszek
username1==username try with username1.equals(username) username1 == username compares references, not string pointed a by reference. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App

[appengine-java] Re: java swing api usage proble

2009-09-24 Thread leszek
You have to split your application into at least two parts: server part (without any user interface related logic) and client side, user interface. This client side can be java/swing (applet), or Java Script, HTML, JSP etc. --~--~-~--~~~---~--~~ You received this me

[appengine-java] Re: Single transaction and makePersistentAll

2009-09-24 Thread leszek
Obviously it will not work, makePersistentAll is nothing more than: for (Entity e : parameter_List) { em.makePersistent(e); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To p

[appengine-java] Re: Delete all from datastore

2009-09-24 Thread leszek
If you want to clean your local datastore with respect to junit tests - look at this link: http://code.google.com/appengine/docs/java/howto/unittesting.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App

[appengine-java] Re: JDO vs low level API

2009-09-24 Thread leszek
"De gustibus non est disputandum" - if you feel more comfortable with low-level Api than with JDO/JPA Api it is up to you. You spent two days trying to cope with Google App Engine JPA/JDO problem, I spent a lot of sleepless nights migrating my EJB3/JPA application to Google App Engine keeping back

[appengine-java] Re: How to location my service in Unit testing?

2009-09-23 Thread leszek
You need to have your data access method separated from servlet code or RPC (if GWT is used) code. Assume that you have something like: class Customer { private Key customerId; ... } class MyDataAccessService { public void addCustomer(Customer c) { ... } and you want to test it. Yo

[appengine-java] Re: Best practice for modeling relationships (Java, Datastore) - list of keys or list of actual objects?!

2009-09-22 Thread leszek
Much better is to keep List than retrieve Pictures on demand ('paging' them) using 'batch gets' : http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/d907ba54c579e9ed --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[appengine-java] Re: Type Owned by Two Different Types?

2009-09-21 Thread leszek
That's very interesting because it works for me: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Employee { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private String firstName; private String lastName; }

[appengine-java] Re: Storing GWT-RPC objects to BigTable

2009-09-21 Thread leszek
Yes, the second solution (TO - transient objects) means code duplicating but seems more realistic. You can share the same code between GWT (client) and server (Google App Engine). If you have few classes no problem to call set and get several times. Of course, if you have more classes and more att

[appengine-java] Re: Restricted classes

2009-09-21 Thread leszek
It is known issue : http://code.google.com/p/googleappengine/issues/list?can=2&q=awt&colspec=ID+Type+Status+Priority+Stars+Owner+Summary+Log+Component&cells=tiles --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Goog

[appengine-java] Re: Accessing Memcache in more than one servlet

2009-09-18 Thread leszek
The second. If you get an object from the cache you have the serialized copy of the object. So to make your changes "persistent" and visible by the other requests you have to put it into the cache again. Also to have a "fresh" object you have to get it again. What you have is a reference to the se

[appengine-java] Re: Do app engine support "OR" operator??

2009-09-18 Thread leszek
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Queries An entity must match all filters to be a result. In the JDOQL string syntax, multiple filters are specified separated by && (logical "and"). Other logical combinations of filters (logical "or"

[appengine-java] Re: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-18 Thread leszek
There is nothing wrong with that, it should work. Could you past also a persiting sequence, where this exception is thrown. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post t

[appengine-java] Re: date between jdo query

2009-09-18 Thread leszek
Could you provide more details how your failing query looks like ? --~--~-~--~~~---~--~~ 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-java@googleg

[appengine-java] Re: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-18 Thread leszek
Could you provide more details, how your entity class looks like and how it is persisted ? --~--~-~--~~~---~--~~ 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 googl

[appengine-java] Re: self referral one-to-many relationship with null root

2009-09-17 Thread leszek
Follow this thread: http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/3affdf1441f864b6/47e35ad2811de108?lnk=gst&q=self#47e35ad2811de108 It looks like known issue. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

[appengine-java] Re: Unicode problems

2009-09-17 Thread leszek
I'm using GWT on the client side. --~--~-~--~~~---~--~~ 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-java@googlegroups.com To unsubscribe from thi

[appengine-java] Re: Unicode problems

2009-09-16 Thread leszek
Very interesting, I don't have any problems with Polish characters. Firstly look at your tables via data-viewer in the production environment. I see Polish characters there. You have to narrow the problem - the characters are lost during sending, persisting or retrieving. --~--~-~--~~

[appengine-java] Re: RPC call and variables

2009-09-16 Thread leszek
Follow this thread - could be helpful http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/d816992c5a82506b/e50b4eb988d2f45b?lnk=gst&q=comet#e50b4eb988d2f45b --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

[appengine-java] Re: RPC call and variables

2009-09-15 Thread leszek
It is a clustered environment and you cannot assume that every request is run in the JVM. If you want to share data between requests you should persist them (data) in datastore. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[appengine-java] Re: Regarding debugging error

2009-09-15 Thread leszek
Replace: AuthFilter With com.org.login.AuthFilter --~--~-~--~~~---~--~~ 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-java@googlegroups.com To u

[appengine-java] Re: Can I avoid Data Nucleus and still use JPA?

2009-09-15 Thread leszek
Nobody can contradict that DataNucleus is a high quality software. The fact that it is Google's persistence provider of choice speaks for itself. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for

[appengine-java] Re: JDO/JPA Snippets That Work - Creating a bidirectional, owned, one-to-many relationship

2009-09-15 Thread leszek
I suggest the next step. How to run some query on Chapter referencing to the property in Book, E.g Book is having a 'Genre', Chapter is having a 'Number' and query: find all Chapter number 4 in Books being of genre 'Fiction'. And two ways how to resolve this query: - keeping scheme normalized: mul

[appengine-java] Re: Can I avoid Data Nucleus and still use JPA?

2009-09-15 Thread leszek
Sorry, but I'm afraid that you are completely on the bad track : - Google App Engine JPA supports only some subset of JPA implementation, it is unlikely that your existing-not trivial JPA application will migrate to Google App Engine without hefty coding. More probably that you can migrate smoot

[appengine-java] Migration to Google App Engine for Java

2009-09-14 Thread leszek
Some thoughts based on experience. http://hoteljavaopensource.blogspot.com/2009/09/migration-to-google-app-engine.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to th

[appengine-java] Re: Create different entity (Database) for each user.

2009-09-14 Thread leszek
Look at this thread, may provide some useful information. http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/6ae2e6737cbb4b40/f47f015099538467?lnk=gst&q=administrator#f47f015099538467 --~--~-~--~~~---~--~~ You received this message because you

[appengine-java] Re: Can I avoid Data Nucleus and still use JPA?

2009-09-14 Thread leszek
Hibernate is not JPA implementation, it exposes its own API. "Hibernate Entity Manager" is a product build on standard Hibernate and offering full JPA interface. Google App Engine does not support Hibernate: http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine -

[appengine-java] Re: Regarding JDOQL

2009-09-11 Thread leszek
But what do you want to achieve ? If you use eclipse plugin then together with google app engine stuff comes also JDOQL (being precise the subset of JDOQL supported by google app engine) and it is at hand. No addition stuff is needed to be downloaded. --~--~-~--~~~---~

[appengine-java] Re: Tomcat Instead of Jetty.

2009-09-10 Thread leszek
But do you mean GWT or Google App Engine application ? GWT comes with embedded tomcat to keep backward compatiblity. Although there is a warning that it is deprecated and can be deleted in the future. If you want to use tomcat simply start shell as it is described in documentation for GWT 1.5 (o

[appengine-java] Re: Own Login system

2009-09-10 Thread leszek
Why not create simple "CRUD" for keeping log-id and password and simple dialog to get login id and password and check against persisted class being managed by this "CRUD". It could be a good starting point. --~--~-~--~~~---~--~~ You received this message because you

[appengine-java] Re: Problem saving an object using makePersistent

2009-09-09 Thread leszek
Replace: @Persistent with: @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) Otherwise provide some code how you call the method public void saveUser(User user) (I'm guessing that this method throws exception). particulary how the 'user' parameter is created. --~--~-~--~---

[appengine-java] Re: testing persistence with one to many relashionship

2009-09-09 Thread leszek
It works for me. I have something like: class Employee { ... @Persistent(mappedBy="employee") private List contactInfo; .. } class ContactInfo { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; ...} than: Employee e; ...

[appengine-java] Re: Initializing Datastore

2009-09-09 Thread leszek
But what you mean by "real application" ? If you want to have a server part of your application and client part running outside Google App Engine you can implement access to the server part and Google App Engine datastore via servlet and standard GET/POST request. http://code.google.com/appengine

[appengine-java] Re: Master/Detail relations and redundant data handling

2009-09-07 Thread leszek
I'm not sure if your taking of the problem is correct. To my mind it runs: You have Company and Employee. Company has many Employees and Employee is working for one company. "Normalized" version looks like: class Company { @Persistent private String companyName; @Persistent private String

[appengine-java] Re: JDO queries on owned/unowned one-to-many relationships

2009-09-04 Thread leszek
query.setFilter("key > keyParam and key < keyParam1"); --~--~-~--~~~---~--~~ 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-java@googlegroups.com

[appengine-java] Re: JDO queries on owned/unowned one-to-many relationships

2009-09-04 Thread leszek
You can run queries on keys: http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Queries_on_Keys The first part of child key (ContactInfo.class) contains parent (Employee) key. Employee e; query = pm.newQuery(ContactInfo.class); query.setFilter("key == keyParam

[appengine-java] Re: JDO query using LIKE

2009-09-03 Thread leszek
Follow this: http://groups.google.com/group/google-appengine-java/browse_frm/thread/5e4ff1391f27347c/8f64a95c141cb27e?lnk=gst&q=like+in#8f64a95c141cb27e --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Eng

[appengine-java] Re: How to make a isKeysOnly() query in JDO?

2009-09-03 Thread leszek
But how do you want to accomplish it ? There is no query like "give me the next no more than 1000 keys using filter key > lastkey". Also there is no query like "give me the least key using filter "key > lastkey". --~--~-~--~~~---~--~~ You received this message beca

[appengine-java] Re: HttpSession handling question

2009-09-03 Thread leszek
Have you enabled session ? By default it is read-only. WEB-INF/appengine-web.xml. true http://code.google.com/appengine/docs/java/config/appconfig.html --- Enabling Sessions App Engine includes an implementation of sessions, using the servlet session interface. The implementation uses the

[appengine-java] Re: Unowned relationships

2009-09-03 Thread leszek
Keep also in mind that it is not enough to convert 'Child' to 'Key' while persisting 'Parent'. You should also set key to Parent in Child, otherwise, having Child only, it will be impossible to know the Parent. --~--~-~--~~~---~--~~ You received this message becaus

[appengine-java] Re: When create a multiple module entry in a project?

2009-09-03 Thread leszek
Do you mean GWT entry module ? But you did better asking this question here: http://groups.google.com/group/Google-Web-Toolkit?pli=1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group.

[appengine-java] Re: JPA support for enum's

2009-09-03 Thread leszek
It works for me, also without any annotation. Something like: Enum { Enum1, Enum }; class EnityClass { private Enum en; public Enum getEn() { return en; } public void setEn(Enum en) { this.en = en; } } EntityClass e = new Ent

[appengine-java] Re: self join in google app engine

2009-09-02 Thread leszek
Read this thread - could be helpfull : http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/3affdf1441f864b6/99a166946ad0ef61?lnk=gst&q=self#99a166946ad0ef61 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

[appengine-java] Re: A matter in local time

2009-09-02 Thread leszek
If you delete double declaration (String formattedDate) and add proper imports and declaration 'Calendar cal = Calendar.getInstance()); it should work. But you are having this problem while running in local environment (in your machine) or it does not work after deploying to google (production)

[appengine-java] Re: who can help me

2009-09-01 Thread leszek
Look into this file: WEB-INF/web.xml. It looks like XML-syntax problem. --~--~-~--~~~---~--~~ 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-java@go

[appengine-java] Re: Using external jars

2009-09-01 Thread leszek
But what class cannot be found ? Are you sure that you have put flexjson and all necessary jars in WEB-INF/lib directory of your project ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java"

[appengine-java] Re: i have create a gwt project ,now when deploy the project with gae ,some problem has appear

2009-09-01 Thread leszek
It is a common problem. Read this thread: http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/bce6630a3f01f23a/62cb1c4d38cc06c7?lnk=gst&q=com.google.gwt.user.client.rpc.SerializationException%3A+Type+%27org.datanucleus.store.appengine.query.StreamingQueryResult%27+was+not+inc

[appengine-java] Re: how to use Multi-parameter in Query

2009-09-01 Thread leszek
http://www.datanucleus.org/products/accessplatform_1_1/jdo/jdoql.html Read also about GAE limitations on queries: http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html Multi-parameters (more than one): query.declareParameters("Date dFrom, Date pTo"); --~--~-~--~--

[appengine-java] Re: Unowned relationships

2009-09-01 Thread leszek
You can follow something like that class Parent { @Persistent private List childList; // non Persistent private List list; ... } class Child { @PrimaryKey private Long/Key key; ... } // before save Parent private void beforeSave(EntityManager em,Parent pa) { i

[appengine-java] Re: Problems in Connecting to Mysql database using Hibernate

2009-08-31 Thread leszek
"DataNucleus JPA" --~--~-~--~~~---~--~~ 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-java@googlegroups.com To unsubscribe from this group, send em

[appengine-java] Re: Problems in Connecting to Mysql database using Hibernate

2009-08-31 Thread leszek
No help is possible. There is no support for Hibernate and MySql in Google App Engine. The only framework supported is DataNucleus/JPA/JDO with GAE plugin and the only database available is datastore/Google Big Table. You have to refactor your application to make it possible. I think that JPA is m

[appengine-java] Re: Problem with a query and index

2009-08-31 Thread leszek
Query is ok. But what Date are you using. java.sql.Date or java.util.Date ? If java.util.Date please consider also the hour/min/ sec part of the date: the field persisted and 'mdatedispo' parameter. May be the problem is hidden there ? --~--~-~--~~~---~--~~ You rece

[appengine-java] Re: Is there limitation of size of webapp uploaded to GAE?

2009-08-31 Thread leszek
http://code.google.com/appengine/docs/java/runtime.html#Quotas_and_Limits (navigate to the bottom) --~--~-~--~~~---~--~~ 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

[appengine-java] Re: Exception on creation of java.io.File in GAE

2009-08-31 Thread leszek
http://code.google.com/appengine/docs/java/config/appconfig.html May be you find there the solution, but I'm guessing only. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post

[appengine-java] Re: JPA on App Engine ... how hard can it be?

2009-08-31 Thread leszek
> the problem is simple: > > @Entity > public class Company implements Serializable { >     // ... >     public Company(String irsEIN) { >         ein = irsEIN; >         // ... >     } > >     @Id String ein; // the IRS EIN for the company ... this is a > unique id and a good one to use for PK? >

[appengine-java] Re: jdo & date

2009-08-29 Thread leszek
You are right, but 'midomarocain'' wants to keep full date (with hours/ min/secs) and in one context compare the full date and in the another context compare the same date but using the year/month/day part only. But, of course, it is possible to split the date to java.sql.Date and java.sql.Time an

[appengine-java] Re: issue about JDO Relationship in JUnit

2009-08-29 Thread leszek
But what you have while running this assert ? I dare say that p2.getSentences.size() is 0 at that moment. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send

[appengine-java] Re: jdo & date

2009-08-29 Thread leszek
Hm Could you elaborate a little more on that ? --~--~-~--~~~---~--~~ 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-java@googlegroups.com To u

[appengine-java] Re: Model to Optimize Queries

2009-08-29 Thread leszek
Let consider a different approach. Take into account that Article and Reviewer are rather immutable data (you need adding new article but not to change existing), why break this nice feature. Consider several classes: Article { Key , {tags} next attribuites } Reviewer { Key, mail, ... next at

  1   2   >