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 7918465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:31:04+00:00 2026-06-03T15:31:04+00:00

I have an entity and one of my properties is an ArrayList of objects,

  • 0

I have an entity and one of my properties is an ArrayList of objects, which is serialized. I am trying to delete one of the elements of the list and persist the entity. Everything works fine locally, but not when deployed.

My code:

@Inject
public Repository<User> userRepo;
...
Leader leader = (Leader) item.getModelObject();
...
MySession.get().getUser().getLeaders().remove(leader);
JDOHelper.makeDirty(MySession.get().getUser(), "leaders");
userRepo.persist(MySession.get().getUser());

property definition in User entity:

@Persistent(defaultFetchGroup = "true", serialized = "true")
@Extension(vendorName = "datanucleus", key = "gae.unindexed", value = "true")
private ArrayList<Leader> leaders = new ArrayList<Leader>();

I am using datanucleus-core version 1.1.6, jdo2-api 2.3-eb and datanucleus-appengine 1.0.10

It works fine when I add new items to the list, but not when I remove something – why is it so? And how can I make it work?

  • 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-06-03T15:31:09+00:00Added an answer on June 3, 2026 at 3:31 pm

    Making something dirty makes it dirty and nothing more; persist/flush happens after … start of next transaction (as per JDO/JPA spec) or close of PM/EM; no call to makePersistent/persist will change that. This isn’t DataNucleus “deciding for itself” not to persist an object, it’s simply following the spec.

    If you use recent GAE releases (v2.0) you can have non-transactional atomic persist/delete (extension to the specs). If you use SVN trunk (v2.1) you can also have nontransactional atomic updates (extending it further still). i.e with latest code you have the equivalent of JDBC “autocommit”

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

Sidebar

Related Questions

When I have a parent Entity hold a list of other entity (one to
I have an entity BattleUser which contains four properties: Id, BattleId, UserId and DateTime.
I have this entity - I'm trying to determine the type of its properties
Imagine I have a domain with a Entity and one of properties of this
I have two entity that has an one-to-many relationship, I´m trying to select the
I have an entity CategoryModel . One of the properties is copied below: @OneToMany(cascade
I have an entity with several properties, one of them called lastModificationDate. Whenever any
it's possible to have one entity object (class, e.g. User) for more entity models
I'm having some problems using cascade operations on hibernate. I have one entity (TripleDBmodel),
i have an entity Entity1 that have one to many relation with Entity2 as

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.