Quantcast
Channel: Active questions tagged identity-map - Stack Overflow
Browsing latest articles
Browse All 27 View Live

What is the best structure to implement an Identity Map?

Although a DataTable is a memory hog, wouldn't a DataTable be the best choice to implement and IdentityMap if the set of objects is very large since retrieval time is O(1)?UpdateIf I decide to use...

View Article



Where can I find a C# implementation of the "Identity Field" (fowler) pattern...

I've found one that allows multiple fields of type long. However, i'm not sure how useful that is since sometimes we may have Guids or even dates for example.I could also modify his to support my...

View Article

Is there a concurrency problem here? How to test it during development?

Scenario: There exists 'n' teams who each work on their virtual 'wall' (like facebook's wall). Each team sees only their own wall and the posts on it. The posts can be edited by the author of the post...

View Article

sqlalchemy identity map question

The identity map and unit of work patterns are part of the reasons sqlalchemy is much more attractive than django.db. However, I am not sure how the identity map would work, or if it works when an...

View Article

Getting newly added entities from ObjectContext before saving changes

OK, I read these:EntityFramework show entities before saving changesWhere added objects are stored in ObjectContext?I guess there is no clear solution of the problem (although the second post is from...

View Article


Are NHibernate ICriteria queries cached or put in the identity map?

Using NHibernate I usually query for single records using the Get() or Load() methods (depending on if I need a proxy or not):SomeEntity obj = session.Get<SomeEntity>(new PrimaryKeyId(1));Now, if...

View Article

Rails 3.1 Identity Map issues?

Does anyone know the key issues that the Rails 3.1 IdentityMap feature has that has forced the feature to be disabled by default? I'm sure that there are minor specific issues, but are there any major...

View Article

How can I get access to or replace LINQ to SQL's IdentityManager?

I need to find out if an object with a particular primary key is already attached to a DataContext and get the entity from the DataContext if it is attached. Is there any way at all to do this that...

View Article


Patterns/structures for reverse navigating a many-to-many relationship?

A user story: The user of our app creates road trips. A roadtrip is a sequential series of interesting destinations. Each destination has some details about an activity or sight to see while there. In...

View Article


Storage for DataMappers in ASP.NET WebApplication

In Martin Fowler's "Patterns of Enterprise Application Architecture"is described approach for organizing DAL like a set of mappers for entities. Each has it's own IdentityMap storing specific...

View Article

Force Entity Framework to return a new instance

We have a scenario in our code when only a few properties of an entity are allowed to be changed. To guarantee that, we have code similar to this:public void SaveCustomer(Customer customer){ var...

View Article

How to invalidate entity framework 4 internal cache

As I know Entity Framework implements the Identity Map Pattern, so EF caches some entities in the memory.Let I give you example.var context = new StudentContext();var student =...

View Article

Mongoid returns _id field only in has_many relation when identity map enabled

Mongoid 2.4.4Rails 3.2.1MongoDB 2.0.1I have 3 models:Authentication、Favorite and Content。It just like a Many to Many relations from Authentication to Contentthrough Favorite.When I query like this...

View Article


How long should a DataContext live?

I was just wondering how long should a DataContext really live. All the patterns and practices books like Dino Esposito's Microsoft .NET: Architecting Applications for the Enterprise tell you,...

View Article

Why entity framework isn't implement identity map with unit of work?

I have written test code as bellow:Entities db = new Entities();var place = new Place { Id = Guid.NewGuid(), Name = "test", Address = "address" };db.Places.Add(place);var cachedPlace =...

View Article


Identity map pattern and table data gateway c#

I´m implementing Identity map pattern and DataMapper pattern in my project. But I have some problems. When I´m getting data from database by Gateway I´m creating new instance of object and return List...

View Article

Rails 3.1 record object instantiating twice in Controller actions?

I have a controller that basically fetches a record and instantiates into an object.When it runs, the object is instantiated twice with different object_ids. e.g.def index @users= Users.all puts...

View Article


Image may be NSFW.
Clik here to view.

Can I use patterns like identity map in a stateless environment

Szenario:I have read the book P of EAA by Martin Fowler and stumbled over the pattern called Identity Map. I've thought about using this pattern in an ASP.NET MVC application. Question:As far as I know...

View Article

Mapping objects graphs of DTO's to EF Entities using AutoMapper

How good is Entity Framework at detecting changes made to objects if using a tool like AutoMapper to move DTO data into entities?e.g.var existing = dbcontext.First(e => e.Id =...

View Article

NFSv4 which "domain" to put in idmapd.conf?

I'm using NFSv4 but suddenly when the NFS Server got rebooted, all the files on the Clients are having nobody ownerships after the Server is booted and started its whatever services.Then i found some...

View Article

Ruby implementations of the identity map pattern

I am planning to implement an identity map for a small project which is not using any ORM tool. The standard implementation in most examples I have seen is just a hash by object id, however it is...

View Article


Which Android/Java ORM uses “object caching” like Hibernate does?

I saw a bunch of questions about lightweight alternatives to Hibernate, especially for Android. But which of them has the “Identity Map” pattern?This pattern makes sure that any object representing a...

View Article


How to have identity map in doctrine ORM

need to use a good PHP ORM that has elements of Datamapper and I am not clever enough to code it myself.chosen doctrine, but after reading through the user guide, cannot find anything that says how to...

View Article

SQLAlchemy get items from the identity map not only by primary key

Is it possible to use a couple of fields not from the primary key to retrieve items (already fetched earlier) from the identity map? For example, I often query a table by (external_id, platform_id)...

View Article

What are the implications of forking the EntityManager a large amount of...

I'm building a back-end web server with Apollo Server Express and Mikro-ORM and following the docs, I found that the fork() method can be used to get a clean entity manager. I've used the function in...

View Article


IdentitySet / IdentityHashSet (use IdentityHashMap)

I know about IdentityHashMap, but I need to use to something like "IdentitySet" (use equals as o1 == o2 ). I'm going to use one to listen Observable list with "extractor" (JavaFX): List<Person>...

View Article

How to use UnitOfWork pattern together with IdentityMap pattern?

In Martin Fowler's book I read about UnitOfWork and IdentityMap patterns.Author mentioned that it is a good idea to put identityMap inside the UnitOfWork. But how to do it ?As far I understood...

View Article
Browsing latest articles
Browse All 27 View Live




Latest Images