Google Cloud Platform Blog
Product updates, customer stories, and tips and tricks on Google Cloud Platform
JPA/JDO Java Persistence Tips - The Year In Review
2009年12月22日星期二
If you’re developing a Java application on App Engine you probably already know that you can use JPA and JDO, both standard Java persistence APIs, to interact with the datastore. What you may not know, and what I’m here to point out, is that for the past few months I’ve been accumulating a
collection of practical, real-world examples
that can help you take full advantage of these powerful APIs.
In
episode one
I put together a working example of an owned, bidirectional, one-to-many relationship and demonstrated how you can persist child objects just by associating them with parent objects. In
episode two
I demonstrated how to perform a batch get by issuing a query that only filters on the primary key property of your model object. In
episode three
I explored the exciting world of “transparent persistence,” explaining how you can modify the persistent state of objects without making any explicit calls to repersist them. In
episode four
I issued a keys-only query and got the results back crazy-fast because the datastore skipped the extra scan that turns keys into full-fledged entities. And in
episode five
I demonstrated how serialized fields can help you store arbitrary objects in the datastore.
After episode five I got a little bit tired, but there was still so much more to say, so I pressed on.
In
episode six
I powered through a discussion of long-running transactions and unearthed the ancient secret of how you can use optimistic locking to prevent users from updating stale data. In
episode seven
I explained how using unindexed properties can speed up your writes and save you valuable CPU time. In
episode eight
I attempted (cautiously) to blow your mind with a solution for case-insensitive queries. And finally, in
episode nine
, mere hours after releasing support for != and IN query operators in the SDK, I dove under the hood of these operators to help you understand their performance characteristics.
Many of these topics were inspired by questions from you, our users, so if there are topics you’d like to see covered in the coming year please let me know via
the forum
. As long as you keep reading and asking questions, I’ll keep writing.
Max Ross, App Engine Engineer
Free Trial
GCP Blogs
Big Data & Machine Learning
Kubernetes
GCP Japan Blog
Firebase Blog
Apigee Blog
Popular Posts
Understanding Cloud Pricing
World's largest event dataset now publicly available in BigQuery
A look inside Google’s Data Center Networks
Enter the Andromeda zone - Google Cloud Platform’s latest networking stack
New in Google Cloud Storage: auto-delete, regional buckets and faster uploads
标签
Announcements
193
Big Data & Machine Learning
134
Compute
271
Containers & Kubernetes
92
CRE
27
Customers
107
Developer Tools & Insights
151
Events
38
Infrastructure
44
Management Tools
87
Networking
43
Open
1
Open Source
135
Partners
102
Pricing
28
Security & Identity
85
Solutions
24
Stackdriver
24
Storage & Databases
164
Weekly Roundups
20
Feed
Subscribe by email
Demonstrate your proficiency to design, build and manage solutions on Google Cloud Platform.
Learn More
Technical questions? Check us out on
Stack Overflow
.
Subscribe to
our monthly newsletter
.
Google
on
Follow @googlecloud
Follow
Follow