datanucleus

JPA @NamedQuery with bitwise AND (&) as criteria

耗尽温柔 提交于 2020-06-23 05:05:07
问题 does anyone know how to use bitwise AND (&) as criteria for a JPA NamedQuery without having to use a @NamedNativeQuery? I'm storing status bits in a field. I'm using the following defs for an entity of a view: @NamedQueries({ @NamedQuery(name="ViewProductsList.findAll", query="SELECT v FROM ViewProductsList v"), @NamedQuery(name="ViewProductsList.findFeatured", query="SELECT v FROM ViewProductsList v WHERE v.statusId & 16"), @NamedQuery(name="ViewProductsList.findBySubcategory", query="SELECT

JPA @NamedQuery with bitwise AND (&) as criteria

安稳与你 提交于 2020-06-23 05:04:47
问题 does anyone know how to use bitwise AND (&) as criteria for a JPA NamedQuery without having to use a @NamedNativeQuery? I'm storing status bits in a field. I'm using the following defs for an entity of a view: @NamedQueries({ @NamedQuery(name="ViewProductsList.findAll", query="SELECT v FROM ViewProductsList v"), @NamedQuery(name="ViewProductsList.findFeatured", query="SELECT v FROM ViewProductsList v WHERE v.statusId & 16"), @NamedQuery(name="ViewProductsList.findBySubcategory", query="SELECT

Google App Engine JDO enhancement is failing

喜欢而已 提交于 2020-04-06 10:50:35
问题 I am trying to build my first Google App Engine WAR and am setting up my own external (outside of Eclipse) Ant build to be executed from the terminal. I'm trying to get the <enhance_war/> Ant macro working and am running into a bizarre NoSuchMethodError . Here's my Ant target: <target name="package" depends="gendocs"> <echo message="Enhancing WAR JDO classes." /> <enhance_war war="war" /> <echo message="Packaging the WAR file." /> <war destfile="gen/dist/myapp.war" webxml="war/web.xml">

Google App Engine JDO enhancement is failing

与世无争的帅哥 提交于 2020-04-06 10:50:21
问题 I am trying to build my first Google App Engine WAR and am setting up my own external (outside of Eclipse) Ant build to be executed from the terminal. I'm trying to get the <enhance_war/> Ant macro working and am running into a bizarre NoSuchMethodError . Here's my Ant target: <target name="package" depends="gendocs"> <echo message="Enhancing WAR JDO classes." /> <enhance_war war="war" /> <echo message="Packaging the WAR file." /> <war destfile="gen/dist/myapp.war" webxml="war/web.xml">

JDO transactions + many GAE instances = overriding data

守給你的承諾、 提交于 2020-01-25 15:48:55
问题 I have very simple PersistenceCapable class: import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; @PersistenceCapable public class TheEntity { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; public Long getId() { return id; } @Persistent private int version; public int getVersion() { return version; } public void setVersion(int

Google App Engine JDO 3

混江龙づ霸主 提交于 2020-01-24 02:52:31
问题 Google just came out with JDO 3.0 (which uses DataNucleus 2.0) for Google App Engine, and I want to use it, since it conveniently supports unowned relationships. I've been trying for days, but I can't figure out how to use it with the Google Eclipse plugin. I've found this web page https://developers.google.com/appengine/docs/java/datastore/jdo/overview-dn2, but my project folder doesn't have a build.xml file. I tried creating a separate project and transferring all my code, but the new

Google App Engine JDO 3

馋奶兔 提交于 2020-01-24 02:52:09
问题 Google just came out with JDO 3.0 (which uses DataNucleus 2.0) for Google App Engine, and I want to use it, since it conveniently supports unowned relationships. I've been trying for days, but I can't figure out how to use it with the Google Eclipse plugin. I've found this web page https://developers.google.com/appengine/docs/java/datastore/jdo/overview-dn2, but my project folder doesn't have a build.xml file. I tried creating a separate project and transferring all my code, but the new

No persistence providers available for “transactions-optional” after trying the following discovered implementations:

为君一笑 提交于 2020-01-15 06:15:44
问题 I am trying to create a Google App Engine - GAE with JPA 2.0, I have followed all I need to, putting the correct jars in classpath and making sure my Entities are enhanced. But I am having problems creating my EntityManager. My persistence.xml looks like this: <?xml version="1.0" encoding="UTF-8" ?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml