object-persistence

Is there a pattern for using XML for no-overhead object serialization?

In the same way that you can use JSON in javascript? At least the static properties? Or maybe even for hash-table streaming? Is it oversimplistic about hoping to find something like Object.Serialize(stream) where stream is a file, overrideable with your choice of other likely candidate targets, using some default format, say XML? W...

Object persistence strategy for desktop application

I am developing a Java based desktop application. There are some data generated from the application object model that I need to persist (preferably to a file). There is also a requirement to protect the persisted file so that others can't derive the object model details from the data. What's the best strategy for doing these? I was in t...

Runtime-changeable ORM / OPF Object Persistence Framework for Delphi

One of the projects I'm working on involves a module that needs to allow end users to create what essentially equates to, their own "object classes," storing data structures / record types that they can design and modify at runtime. The users will also be able to customize the user interface considerably, but that is not so much the sc...

Is there a preferred method of database management/object persistence on the iPhone?

I've seen several approaches, and each seem to have significant plusses and minuses. I'm learning iPhone development, I'm building a relatively simple app, which, at it's core, is really not much more than CRUD operations on 3 or four related entities. I'm used to ActiveRecord-type object persistence. The implementations for Cocoa Touch...

Why would you "store instances of the class in the database as entities"?

I'm trying to understand a line from the Google Datastore API which says: JDO uses annotations on Java classes to describe how instances of the class are stored in the datastore as entities, and how entities are recreated as instances when retrieved from the datastore. I'm sure this is a very basic question for most peopl...

Classic ASP Store objects in the session object.

Hi All, I am new to classic ASP and I need to code a web application in classic asp because the customer wants it to be in classic asp. :( Anyways! here is my question: When I have a object of a class called person: Class Person Private m_sFirstName Public Property Get firstName firstName = m_sFirstName End Property Public Pro...

With Python, can I keep a persistent dictionary and modify it?

So, I want to store a dictionary in a persistent file. Is there a way to use regular dictionary methods to add, print, or delete entries from the dictionary in that file? It seems that I would be able to use cPickle to store the dictionary and load it, but I'm not sure where to take it from there. ...

Tracking PHP Object property changes

I'm trying to track all changes made to a PHP variable. The variable can be an object or array. For example it looks something like: $object = array('a', 'b'); This object is then persisted to storage using an object-cache. When php script runs again. So when the script runs the second time, or another script runs and modifies tha...

NHibernate NonUniqueObjectException when reattaching objects to the session (with Lock)

Basic order of execution: A collection of PersistentObjects is queried then cached separately from the session. The collection is passed to a module that needs to reattach them to the session in order to lazily load some of the properties (using session.Lock(obj, LockMode.None)). After the module has completed processing, another modul...

Optimal way to persist an object graph to flash on the iPhone

I have an object graph in Objective-C on the iPhone platform that I wish to persist to flash when closing the app. The graph has about 100k-200k objects and contains many loops (by design). I need to be able to read/write this graph as quickly as possible. So far I have tried using NSCoder. This not only struggles with the loops but als...

Db4O - Can I save a String?

I have the following code: Assert.IsTrue(Repository.FindAll<string>().Count() == 0); string newString = "New String"; Repository.Save(newString); Assert.IsTrue(Repository.FindAll<string>().Count() == 1); But it is failing. I suppose it has something to do with the fact that I'm saving a string. My Save() code is this: public v...

DTOs vs Serializing Persisted Entities

I'm curious to know what the community feels on this subject. I've recently come into the question with a NHibernate/WCF scenario(entities persisted at the service layer) and realized I may be going the wrong direction here. My question is plainly, when using a persistent object graph(NHibernate, LINQ to SQL, etc) behind a web service(W...

Groovy on Grails: GORM and BitSets?

I don't see anything in the official documentation about unsupported persistence data types, so I'm working under the assumption that types available in the Groovy language should be handled. However, for the following domain class: class DocGroupPermissions { Workgroup workgroup; Document document; BitSet permissions = new BitSet(2) p...

.net object persistence

Can you please suggest a free, open source or low cost .net object persistence framework? I am not looking for ORM tools like NHibernate or Entity Framework. The closest commercial product that describes my need is fastobject.net framework. Thanks. ...

What's the easiest way to persist java objects?

Right now I have java program whose classes are currently POJOs and stored in volatile memory. These need to be persisted. As I understand it two popular choices are JDO and the Java Persistence API. For someone who know little about SQL, Torque, etc, which is the easiest way to add persistence to my program's data? ...

Hibernate creates two primary keys when I only want one...

I have a Hibernate class called Expression (simplified here for your viewing pleasure): @Entity public class Expression { @Id @GeneratedValue private long id; private String data; @OneToMany(fetch=FetchType.EAGER) @Cascade({CascadeType.MERGE, CascadeType.PERSIST}) private Set<Expression> dependencies; } T...

NHibernate: Many-to-One - *Must* You Load the Parent Object?

Assume the following entity classes: public class Player { public virtual int ID { get; set; } public virtual string Name { get; set; } public virtual Team Team { get; set; } } public class Team { public virtual int ID { get; set; } public virtual string City { get; set; } public virtual string Nickname { get; set; } } Assume t...

Need to update the primary key on existing objects in GAE Java

Hi, I am building a web app using GAE Java. I have a class that uses a Long ID (generated by appengine) as its primary key. I now want to create a new class that would be the parent class to this original class (a one to many relationship) however the child needs to have a primary key of type "key", not the Long ID I have now. What...

Properly Implementing a One to Many Unidirectional Relationship in Hibernate

I'm trying to learn how to use Hibernate to implement Java Object Persistence. Specifically, I'm trying to figure out how to implement a unidirectional one to many mapping. I've read the hibernate documentation and the numerous Stackoverflow questions on the subject and they are not entirely clear, so I'd like to know what the correct ...

DDD Value Object: How to persist entity objects without tons of SQL joins?

Obviously I am wrong in saying that DDD is similar to EAV/CR in usefulness, but the only difference I see so far is physical tables build for each entity with lots of joins rather than three tables and lots of joins. This must be due to my lack of DDD understanding. How do you physically store these objects to the database without sign...