{"id":164,"date":"2008-05-28T08:30:00","date_gmt":"2008-05-28T08:30:00","guid":{"rendered":"http:\/\/www.tutego.de\/blog\/javainsel\/?p=164"},"modified":"2008-05-28T08:30:00","modified_gmt":"2008-05-28T08:30:00","slug":"jpa-for-amazon-simpledb-0-4-update-vom-20-4","status":"publish","type":"post","link":"https:\/\/www.tutego.de\/blog\/javainsel\/2008\/05\/jpa-for-amazon-simpledb-0-4-update-vom-20-4\/","title":{"rendered":"JPA for Amazon SimpleDB 0.4-Update vom 20.4."},"content":{"rendered":"<p>Ein abgefahrendes Projekt ist eine JPA-Schnittstelle f&#252;r die <a href=\"http:\/\/en.wikipedia.org\/wiki\/Amazon_SimpleDB\">Amazon SimpleDB<\/a> (<a href=\"http:\/\/en.wikipedia.org\/wiki\/Amazon_S3\">Amazon S3 (Simple Storage Service)<\/a>). Mit <a href=\"http:\/\/code.google.com\/p\/simplejpa\/\">http:\/\/code.google.com\/p\/simplejpa\/<\/a> l&#228;sst sich auf die Amazon-Datenbank &#252;ber das standardisierte JPA zugreifen. Die Doku unter <a title=\"http:\/\/code.google.com\/p\/simplejpa\/wiki\/GettingStarted\" href=\"http:\/\/code.google.com\/p\/simplejpa\/wiki\/GettingStarted\">http:\/\/code.google.com\/p\/simplejpa\/wiki\/GettingStarted<\/a> listet alles n&#246;tigen Jar-Dateien auf und zeigt anhand eines kleines Beispiels die Nutzung. Da die Amazon-DB keine &quot;richtige&quot; relationale DB ist, gibt es auch einige Einschr&#228;nkungen, etwa &quot;<a>Can only query on a single object type, no joins.<\/a>&quot; Auf der anderen Seite:<\/p>\n<ul>\n<li><a>Supports ManyToOne references with lazy loading <\/a><\/li>\n<li><a>Supports OneToMany collections with lazy loading <\/a><\/li>\n<li><a>Large object (LOB) support via Amazon S3 <\/a><\/li>\n<li><a>Caches objects for quick response after first retrieval <\/a><\/li>\n<li><a>Retrieves result sets concurrently for fastest retrieval from SimpleDB <\/a><\/li>\n<li>JPA Queries (subset)<\/li>\n<li><a>@ManyToOne &#8211; object references. Stores id reference to another object in another Domain <\/a><\/li>\n<li><a>@OneToMany (java.util.List only, must be generified, must be bi-directional with mappedBy parameter) &#8211; Collection support. Please be careful with collections, usually better to just query for what you want rather than attaching via collections. <\/a><\/li>\n<li><a>@Inheritance &#8211; Only SINGLE_TABLE supported (only one that makes sense). <\/a><\/li>\n<li><a>@MappedSuperClass &#8211; Useful for a common ID and timestamping class. <\/a><\/li>\n<li><a>@Lob &#8211; stores lobs in S3 so make it as big as you want (up to 5GB). <\/a><\/li>\n<li><a>@Id &#8211; MUST be a string <\/a><\/li>\n<li><a>JPA Queries &#8211; see <\/a><a href=\"http:\/\/code.google.com\/p\/simplejpa\/wiki\/JPAQuery\">JPAQuery<\/a> page <\/li>\n<li>Integer and Long &#8211; no problems, all good. <\/li>\n<li>Double &#8211; pads to 20 digits on each side of the decimal by default so fine for a lot of cases, but if you plan to use Double&#8217;s, let us know so we can work it out perfectly. SimpleDB makes it hard to work with these numbers because it treats everything as a String. <\/li>\n<li>BigDecimal &#8211; same problems as Double <\/li>\n<li>String <\/li>\n<li>no primitives yet! Please use wrappers only for now. <\/li>\n<li>@Enumerated (ordinal and string) <\/li>\n<li>@Column (name only) <\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Ein abgefahrendes Projekt ist eine JPA-Schnittstelle f&#252;r die Amazon SimpleDB (Amazon S3 (Simple Storage Service)). Mit http:\/\/code.google.com\/p\/simplejpa\/ l&#228;sst sich auf die Amazon-Datenbank &#252;ber das standardisierte JPA zugreifen. Die Doku unter http:\/\/code.google.com\/p\/simplejpa\/wiki\/GettingStarted listet alles n&#246;tigen Jar-Dateien auf und zeigt anhand eines kleines Beispiels die Nutzung. Da die Amazon-DB keine &quot;richtige&quot; relationale DB ist, gibt es auch [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[4],"tags":[],"class_list":["post-164","post","type-post","status-publish","format-standard","hentry","category-open-source"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/comments?post=164"}],"version-history":[{"count":0,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/164\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/media?parent=164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/categories?post=164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/tags?post=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}