Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7444007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:25:26+00:00 2026-05-29T11:25:26+00:00

For an iOS project I’m using GAE (Java stack) to store the user’s device

  • 0

For an iOS project I’m using GAE (Java stack) to store the user’s device token and use it to send Push notifications.

I have a Device entity which contains several fields, including “appVersion” field of type String. The database contains some Devices with version 1 and some with version 2.

When I run a JDO query to find all devices with “appVersion” equals to 2 it returns the expected result, but when I do the same with version 1 the query return no result, although there are Entities which match this condition.

This is the code:

javax.jdo.Query query = _pm.newQuery(Device.class, "appVersion == appVersionParams");

query.declareParameters(String.class.getName()+" appVersionParams");

List<Device> results = (List<Device>) query.execute(message.getAppVersion());

I verified several times that the Device Entities with version 1 are stored correctly (the type is String and contains the right, trimmed value which indeed match exactly to the parameter I’m passing).

I first encountered this issue on the Dev environment, so I deleted the local DB and created test entities and run the Query again – this time it returned the expected results for version 1 and 2. But after I restarted the server it again returned false results for version 1 (while doing good with version 2). Hoping it was just a bug on the local dev env. I deployed it to the production environment and it returned only 4 entities (there are few thousands match this condition) – all entities were stored in the same way/API.

I also tried to switch from JDO to the low level APIs to fetch the Entities but i got the same weird behavior. This is the code for it:

Query q = new Query("Device");
q.addFilter("appVersion", FilterOperator.EQUAL, message.getAppVersion());

I’m going nuts here.. what’s going on ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:25:27+00:00Added an answer on May 29, 2026 at 11:25 am

    The problem was related to a modification I made to the persistent Entity structure/schema without proper use of serialVersionUID. See the question’s comments for more details, specifically Viruzzo’s one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my ios project I use git as scm. Xcode listing of repositories includes
I am using PhoneGap for an iOS project and everything is working except I
I've just tried compiling an iOS project using the the LLVM 1.5 compiler (included
I'm planning on using Finch in my iOS project to play audio sound effects
in my iOS project I use InAppSettings . This is missing a delegate in
I'm using Core data in an iOS project. I have the data model setup
I want to use InAppSettings in my iOS project. So I copied the InAppSettings
I'm using a binary framework in my iOS project. This project is only available
Related to my precedent question error when using a bundle in an iOS project
This question is related to a iOS project written in ObjectiveC that makes use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.