On Wed, Jan 25, 2012 at 1:57 AM, Jeff Schnitzer j...@infohazard.org wrote:
On Tue, Jan 24, 2012 at 4:21 PM, John Goche johngoch...@googlemail.com
wrote:
The main reason I ask is that loading two entities is about twice as
expensive as loading one twice the size.
Tough. I cannot
Hello,
I have the following classes in a unidirectional 1-1 relationship to each
other:
class A {
B b;
// ... more fields
}
class B {
String k;
// ... more fields
}
I want k to be the primary key for class B as well as for class A.
How do I accomplish this task? I've been told I
Do you have any good reason to have separate classes rather than one big
one with all the stuff that's in each? The main reason I ask is that
loading two entities is about twice as expensive as loading one twice the
size. If you do have a good reason, you could still persist them as a
single
On Tue, Jan 24, 2012 at 10:08 PM, Matthew Jaggard matt...@jaggard.org.ukwrote:
Do you have any good reason to have separate classes rather than one big
one with all the stuff that's in each?
Well, the reason is that I need to reuse class B. For example class A also
has a separate ListB
You don't need to implement a Primary Key class. Specify the primary field
as a Key and generate the key using KeyFactory:
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyFactory.Builder.html
You can autogenerate IDs with this method:
On Tue, Jan 24, 2012 at 10:31 PM, Ikai Lan (Google) ika...@google.comwrote:
You don't need to implement a Primary Key class. Specify the primary field
as a Key and generate the key using KeyFactory:
On Tue, Jan 24, 2012 at 4:21 PM, John Goche johngoch...@googlemail.com wrote:
The main reason I ask is that loading two entities is about twice as
expensive as loading one twice the size.
Tough. I cannot sacrifice code readability here.
This is an intriguing attitude.
You have arrived with