lfaldanam / sharp-architecture

Automatically exported from code.google.com/p/sharp-architecture
Other
0 stars 0 forks source link

Problems with EntityDuplicateChecker and Multiple DataBase support #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Seems that there are problems with the use of multiple databases and 
EntityDuplicateChecker. When you call IsValid() for an entity always 
tries to use the default factory instead of use the factory of the 
repository with which the entity was obtained (for example). 

What steps will reproduce the problem?

1. Use a specific factory in a repository 
-------------------------------------------------------- 

[SessionFactory("OtherFactory")] 
public class ProductRepository : ... 
{ 
//... 

} 

2. In some method of the logic call entity.IsValid() 
----------------------------------------------- 

Product product = productRepository.Get(productId); //Use "OtherFactory"
//Some changes in the entity... 

product.IsValid(); //Always try to use "default" session factory to 
validate entity duplicates 

//Rest of code... 

Original issue reported on code.google.com by ernestma...@yahoo.es on 17 Jun 2009 at 8:06

GoogleCodeExporter commented 9 years ago
I've attempted to fix this with r489. 

Original comment by frank.l...@gmail.com on 1 Sep 2009 at 10:55

GoogleCodeExporter commented 9 years ago

Original comment by frank.l...@gmail.com on 1 Sep 2009 at 11:06