Questions tagged [orphaned-objects]

An orphaned object is one that cannot be found in the directory tree. File system objects can become orphaned when the directories that referenced them are damaged.

In an OOP (object oriented programming) context , an orphaned object is an object which has no more references to it, and because of that is lost in memory. In Java programming language, for instance, the 'garbage collector' is the object responsible for removing these objects from memory.

29 questions
23
votes
2 answers

Prevent Hibernate from deleting orphaned entities while merging an entity having entity associations with orphanRemoval set to true

Taking a very simple example of one-to-many relationship (country -> state). Country (inverse side) : @OneToMany(mappedBy = "country", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true) private List
Tiny
  • 27,221
  • 105
  • 339
  • 599
9
votes
3 answers

Auto-expire orphaned Subscription (Azure ServiceBus Messaging SubscriptionClient)

The scenario I have in mind is this: Service Bus is used for instance-to-instance communication, so a Subscription is unique per service instance. The end result is that if an instance does not shut down gracefully, its subscription does not get…
Andrei
  • 1,015
  • 1
  • 11
  • 19
7
votes
1 answer

Setting orphanRemoval to true while migrating children from their parent to another parent

Important Notice : If you are reading this post, then consider looking into this post too for in-depth discussions. It is a quite usual practice/situation/requirement where children of a parent may be migrated to another parent. What happens, if…
Tiny
  • 27,221
  • 105
  • 339
  • 599
6
votes
1 answer

Make orphaned branch from existing repository?

I have a git repository that I have done some testing on and I'd like to include it in the main repository. I would like to add this as an orphaned branch, because I want to keep it but I don't want to bloat the master branch with my test…
vrwim
  • 13,020
  • 13
  • 63
  • 118
6
votes
3 answers

Efficiently delete orphaned m2m objects/tags in Django

I have two models - Photo and Tag - which are connected via a ManyToManyField. class Photo(models.Model): tags = models.ManyToManyField(Tag) class Tag(models.Model): lang = models.CharField(max_length=2) name_es =…
Simon Steinberger
  • 6,605
  • 5
  • 55
  • 97
5
votes
3 answers

How Rails: If a project has tasks it should not be deleted: how can I fix this?

Hi I have a project and each project has tasks. A task belongs to a project. Before I delete a project I want to check if there are related tasks. If there are tasks I don't want to delete the project. If there are no associated tasks, the project…
Runy
  • 57
  • 1
  • 7
5
votes
1 answer

How to assign a tag to the orphaned commit in GitHub?

I have an orphaned commit produced by another person, and I see it in GitHub GUI. This commit is not accessible by cloning the repository as there are no branches/tags that contain this commit on the path. Assuming that the author of the commit has…
Dmitry Kuzminov
  • 6,180
  • 6
  • 18
  • 40
5
votes
1 answer

Git Orphan branch "This branch is 1 commit ahead, n commits behind master"

I've used the following to create an orphan branch on a local repo, then pushed it to a remote on Github: git checkout --orphan worker git rm -rf . git commit --allow-empty -m "Initial orphan commit" git push origin worker I get the "This branch is…
danieln
  • 473
  • 1
  • 5
  • 20
4
votes
4 answers

How can I dispose of an object (say a Bitmap) when it becomes orphaned?

I have a class A providing Bitmaps to other classes B, C, etc. Now class A holds its bitmaps in a ring queue so after a while it will lose reference to the bitmap. While it's still in the queue, the same Bitmap can be checked out by several classes…
Jelly Amma
  • 477
  • 1
  • 5
  • 19
4
votes
0 answers

Objective C, app crashes when changing root view controller. Orphaned without delegate (bug!)

I've implemented a dropdown menu into my iOS app that calls functions to navigate between different storyboards. Each element in that menu calls the following function in the AppDelegate class with a different storyboard name:…
Kylaaa
  • 6,349
  • 2
  • 16
  • 27
4
votes
1 answer

What is the work-around for deleting orphan entities using JPA 2.0 and @OneToMany?

I'm using JPA 2.0, Hibernate 4.1.0.Final, Spring 3.1.1.RELEASE, and Java 1.6. I have this entity with a one-to-many relationship to another entity … import javax.persistence.CascadeType; ... @Entity @Table(name = "classroom") public class Classroom…
Dave
  • 15,639
  • 133
  • 442
  • 830
3
votes
0 answers

hibernate 4.3.0 @OneToMany orphanRemoval=true leaves orphans

I found a lot of discussions on orphanRemoval=true option still leaving orphans, however I do not seem to find the right answer for my problem. I have a Connector class that has a OneToMany relation on a List of UniqueProperty…
jacobw
  • 41
  • 4
3
votes
3 answers

Cannot delete orphan children in Hibernate

I've found lots of these issues, but for some reason they don't work for me. So, I'm obviously doing something wrong. Form Object: @Entity @Table(name = "WEBFORMS_WEBFORM") public class Form { @Id @GeneratedValue @Column(name =…
SpikerTom
  • 125
  • 3
  • 16
3
votes
1 answer

Why does OracleAQ Leave Dead Subscribers in the Queue?

This is Oracle 11.2.0.3. We've got a problem where we use Oracle's JMS over OracleAQ. This works fine except we started noticing the queue getting filled with 1000s, then millions of messages over time. Some of these are in the PROCESSED state,…
Scott
  • 888
  • 7
  • 21
1
vote
1 answer

EclipseLink not removing privately owned one-to-many item

I am unable to get Eclipselink to delete a privately owned entity that is mapped as a one-to-many relationship. When I remove the privately owned entity from the one-to-many collection and set the reference to its parent to NULL and then save the…
Ceniza
  • 120
  • 2
  • 11
1
2