persistence

Persist Local Configuration Data in SharePoint

Hi, I have a piece of data, a simple string containing the server name that the SharePoint solution is deployed to, that I retrieve from a configuration store in a helper method in a common DLL used throughout my solution. This helper method is used throughout my custom pages and web parts, to build a number of URLs, etc. I would li...

ASP.Net Persisting Objects

I'm building an ASP.Net website. I have a "cart" class which stores the items in the users cart. I don't want to re query the database every time the page reloads to populate the cart items stored in this object. Is the best way to store/persist instantiated objects by putting them in a session and store the session to a database (we're ...

Are there any database-like persistence layers available for .NET?

I'm trying to tackle the problem of disconnected operation for an application with a relatively rich data layer, and it occurs to me that the most natural way to make this work is with a client-side database. I don't want to have to install a separate product, however, and I'm left to wonder if there are any layers out there where you c...

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? ...

NSArray, UITableView

If I want the user to be able to edit entries to a table with number data, (the user would click on a table cell, then on that child view, they would enter a number, and return back to the main table view), I was thinking I would just add entries to a NSMutabaleArray. If so, when the user leaves the application, are those values still t...

persistence-unit as RESOURCE_LOCAL or JTA?

1.may i know what is the different of both? both also supported by all database right? 2. jpa transactionmanager and jta transactionmanager different? can explain? ...

spring hibernate configuration using resource_local or jta by default?

may i know as my configuration is done directly on applicationContext.xml, i do not have persistence.xml . by default this is resource_loca or jta? do i need to add extra parameter if i want to use jta? <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName"...

How can I specify dependency in JPA without links from owner entity?

The goal is to remove all Dependent when their Owner is deleted. I have the following classes: @Entity class Dependent { @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY, optional = false) @Column(name = "OWNER") private Owner _owner; } @Entity class Owner { ... } In the current implementation Dependen...

EntityManager.merge inserts duplicate entities

Hi all, I've got a pretty special setup: I create all the classes in Java, connect them in my application (several ManyToOne-relationships). Then, I'd like to iterate over my objects and save them into the database. Sometimes, an object is already in the database, then it should not be persisted again. I implemented the hashCode() and...

Hibernate Vs iBATIS

For our new product re-engineering, we are in the process of selecting the best framework from Java. As the consideration is to go for database agnostic approach for model, we are working on options between Struts + Spring with iBATIS or Hibernate. Please advice which is best as both offer persistence. ...

How is neo4j persistence implemented?

How is neo4j persistence of nodes and relations implemented? How are indexes handled? ...

JPA's context injection

I'm trying to use JPA's Context Injection. Currently my code fails to have the context injected, throwing a NullPointerException: Exception in thread "main" java.lang.NullPointerException at learn.spring.dao.ListingDao.findById(ListingDao.java:19) Below is my code, anyone see what is wrong/missing? Thanks. Spring Configuration...

Persisting data objects on the iphone

I was wondering what your thoughts were on persisting objects (NSDictionarys and NSMutableArrays of Objects) on the iPhone? I've gone through a couple of options in my head: 1.) We persist using NSUserDefaults, this method seems the easiest and I sort of want to just go ahead and use this. The Data I want to store would only maybe be ...

Google App Engine (Java) + Spring managed PersistenceManager

Hi, I've got kinda problem with JDO persistence of a list of just retrieved objects. What I want to do is to: Fetch list of "Orders" Modify one property "status" Make bulk update of "Orders" What I've got so far is "Object with id ... is managed by a different Object Manager". But wait, I haven't faced such a problem without Spring...

Why do we need to specify class inside <persistence-unit> element?

My persistence.xml has 2 persistence-units. Each of them has several <class> elements. I thought that we must specify all classes related to certain persistence-unit. But I accidentally forgot to specify class-element for new entity but the program worked fine even without it. Then I removed all class-elements and everything worked fine...

How to test a persistence layer correctly?

Hi! I read the Book NHibernate in Action and there it is speaking about testing the persistence layer/data abstraction layer. You can test two ways. The mapping-test and the persistence logic-test. Accoring to the book testing the mapping means that entities are correctly loaded and saved. But what's about update's and delete's? By no...

Eclipselink JPA, Oracle, Weblogic, Calling Persist does not commit to database

Hi All, I'm just starting to take a look at java persistence (at the moment with eclipse's default provider of eclipselink). Basically just creating an object and attempting to persist it to the db (Oracle). It was my understanding that the default transactionality should commit the new object to the database when the method retur...

Getting all mapped Entities from EnitityManager

I have a piece of maintenance code that should grant select privileges to a certain user at certain points of time: grant select on A_DB.A_TABLE to READ_ONLY_USER; I want to do this for all tables. I could use select * from tab in Oracle or show tables in MySQL to get the complete list and then move on like that. But since I already ...

How would I save and retrieve a boolean into a file using NSData

I want to save a boolean into a file and also I want to know how you would retrieve it again. I mainly want to use this for when the iPhone terminates and finishes launching in their respected methods. ...

Windows Workflow Foundation 4.0 and Persistence

I'm using the Beta 2 version of Visual Studio 2010 to get a head start on learning to use WF4, and have run into a problem with persistence. In the code below, if I use the commented out creattion of a WorkflowApplication object, persistence works fine. If I use the un-commented creation below, where I pass a dictionary for arguments I...