Comments (1)
This is expected behavior, although perhaps it could use better documentation. When you specify a nil primary key for an entity, appengine-magic assumes you want to use automatically generated primary keys. These keys are not stored as user-accessible entity slots. To access them, you need to use the get-key-object
function. Your call to retrieve
works because retrieve
explicitly operates on primary keys, but, as you noted, the :id
slot is not populated. The ^:key
metadata marker is really just there for cases when you want to specify your own primary keys.
Your example is more idiomatic if you omit the :id
field altogether: (defentity Foo [name])
. Incidentally, the production App Engine will not start numbering your objects at 1, and the automatic primary keys will probably not have monotonically increasing numbers.
from appengine-magic.
Related Issues (20)
- get the interactive mode running HOT 2
- Add support for Servlets HOT 5
- Appengine 1.6.3 + support HOT 3
- lein appengine-prepare broken with lein 1.7.0 HOT 3
- fails on Appengine Java SDK >= 1.6.4 HOT 4
- Unable to use com.google.appengine.api.ThreadManager in dev HOT 2
- Update for GAE sdk 1.7.0 and Clojure 1.4 HOT 1
- Namespaces/Multitenancy issue and fix HOT 1
- Add Support for Lein 2 HOT 3
- ^:clj should be ^{:tag :clj}?
- Error on lein appengine-prepare HOT 4
- ae architecture HOT 2
- repl mystery HOT 4
- Writing (and reading) files to the blobstore throws an error HOT 3
- Provide insight/comments to Clojure Core issue to add support for App Engine Threads HOT 1
- Consider splitting appengine-magic to multiple libraries HOT 1
- I don't know why. help me :( HOT 6
- NullPointerException on query HOT 4
- Could not find 0.5.1-SNAPSHOT in clojars when running lein deps
- new fresh app crash on dev_appserver.sh HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appengine-magic.