Questions tagged [repository-design]
The repository-design tag has no usage guidance.
94
questions
-1
votes
2
answers
69
views
Executable with many sources in subdirectories - should they be collected into libraries?
Suppose I have a project myproj with a single executable myproj_exec that depends on code in hundreds of files. Let's choose C++ as a language (although it could be C and perhaps one of any number of ...
0
votes
0
answers
98
views
Using the generic repository approach, how can you provide the navigation property filters that EF has in its latest versions?
I already have a working solution which converts the inclusions to their dot paths in order to support .Include/.ThenInclude. But, EF now allows you to add filters such as .Include(x => x....
1
vote
0
answers
667
views
How do I Implement the Repository and Unit of Work Patterns in an ASP.NET WEB API Application?
I am new to Entity Framwrok.
I have this pattern so far.
1- IRepository
Here is the class
public interface IRepository<T> where T : BaseEntity
{
IEnumerable<T> GetAll();
...
0
votes
0
answers
92
views
should I upload/add another repository to my new project repository? If so, how to avoid git wanting to add this?
My current project/repository repoA depends on a different self-made repository repoB . This repoB contains some very general functions such that I can be used by other projects as well. That is the ...
2
votes
0
answers
1k
views
How to import changes from a GitHub template?
Thank you for reading my question.
I used GitHub's template feature to generate a repository from a publicly available template.
The template repository has develop and stable branches, and I only ...
2
votes
1
answer
1k
views
DDD: The problem with domain services that need to fetch data as part of their business rules
Suppose I have a domain service which implements the following business rule / policy:
If the total price of all products in category 'family' exceeds 1 million, reduce the price by 50% of the family ...
0
votes
1
answer
61
views
In which API layer (repository/service) to place custom SQL queries logic?
I'm building an API in which I need data that differs a lot from how it is persisted (for each access to the DB, I'm doing 5-10 joins and I can't perform them via code because it takes too long).
I'm ...
1
vote
1
answer
140
views
Repository pattern: isn't getting the entire domain object bad behavior (read method)?
A repository pattern is there to abstract away the actual data source and I do see a lot of benefits in that, but a repository should not use IQueryable to prevent leaking DB information and it should ...
0
votes
1
answer
160
views
Can you Rebase and/or Merge into the same Master Branch?
Currently I am on a project and the developers can't come to an agreement of whether to use Rebase or Merge. Are you able to mix the to Gitflow/Workflow without it being problematic? Is so, why is ...
0
votes
1
answer
178
views
Spring Data Repository with several entities
I have 2 entities according to the following code that have a one-to-one relationship.
@Entity
public class Student
{
@Id
@GeneratedValue
private long id;
...
1
vote
1
answer
988
views
What is the best way to track multi language projects in Git?
I work with automation solutions that leverage anywhere from 2-4 different languages for a single project. For example, I might use C# to manage the overall automation and the user interface but this ...
5
votes
2
answers
2k
views
Where should I put query logic related to filtering data by role user in DDD architecture
I am following DDD architecture for my app. I have App layer, domain layer and data access layer(repository).
Let say I would have 3 roles in my app: admin, supervisor, agency. Every role should ...
1
vote
2
answers
921
views
Android architecture LiveData and Repositories
I am converting my application to room database and try to follow the google architecture best practices based on "Room with a View".
I am having trouble to understand the repository in terms of ...
2
votes
3
answers
2k
views
GitHub social media image is not refreshed on update
I've changed the social media image of my GitHub repository, but when I try to share it in facebook and it displays the old image as I've never updated it in the first place. The image can be updated ...
0
votes
3
answers
2k
views
Remove decimal values from a value of type double or numeric in obiee rpd
I'm working on obiee 12c rpd. I have a measure column in my physical table in DB with bigint data type. In physical layer of rpd, I've chosen its data type as numeric because int data type is so small ...
1
vote
1
answer
413
views
How to design Model class in Repository pattern?
Is it a must in repository pattern to create models for each database tables? or can I create a model that can be placeholder of two or more database tables?
2
votes
0
answers
69
views
How to implement repository pattern for two or more entities
I am trying to implement repository pattern for Web Api project and am confused while implementing the repository where two or more entities involved. What will the best approach for handling this ...
0
votes
0
answers
32
views
Child Model Creation Failed when ViewModel have BaseModel property
I am using WebAPI2 and i have 2 models
public class Model1
{
public int Id { get; set; }
[Required]
public string Name { get; set; }
public string Description { get; set; }
...
0
votes
2
answers
1k
views
Get results within x miles Using GeoCoordinate with respository pattern
I would like to get a list of all organisations within x miles of a location entered by the user. This is converted to a long/lat location.
Organisations are stored in the database with long and lat.
...
9
votes
1
answer
724
views
Handling entity updates from a mapped object
I have my code first, SQL data models (using EF Core 1.1) that are used to model my schema/tables. However I also have domain objects which are partial or full mapped versions of these SQL data models,...
0
votes
1
answer
66
views
Move file to separate repository without moving file on disk
This question is related to, e.g., How to move files from one git repo to another (not a clone), preserving history
Detach (move) subdirectory into separate Git repository but the problem (or at least ...
0
votes
3
answers
105
views
Github Dependency for Solution File
I'm not sure the best way to describe this - i've done some googling but to on avail.
I currently have a solution that has the following:
Repository 1
ProductProject1
ProductProject2
ProductProject3
...
1
vote
1
answer
433
views
How to add record to multiple tables in MVC through EF Repositry
I have three models like below
First Student Model
public class Student
{
public int ID { get; set; }
[ForeignKey("account")]
public int AccountID { get; set; }
public Account ...
1
vote
0
answers
35
views
Organization and suborganizations share resources
I'm designing a repository for multiple tenants. Each tenant (organization) has multiple sub-organizations which have another sub-sub-organizations and so on.
Some of the resources are accessed by ...
1
vote
3
answers
373
views
Are GetById, GetByX CRUD or Business logic methods or both of them
Colleague of mine told me - we don't have a Business logic, we only have CRUD like GetById, GetBySearchTerm, GetByParentID....so I started to wondering about these words.
After reading about DDD, ...
0
votes
2
answers
369
views
Git: what to write into .gitignore file for this kind of repository?
What to put into .gitignore if the repo is a folder containing a set of different projects? they are Android Studio's, Maven's and developed on many OS.
After a research I think to put these lines, ...
8
votes
1
answer
6k
views
Symfony Doctrine entity manager and repository
I understand the benefit or repository pattern but I just can't understand in Symfony3 Doctrine there are Doctrine\ORM\EntityManager and \Doctrine\ORM\EntityRepository
What are the difference between ...
0
votes
1
answer
293
views
GIT permissions : Repository inside a repository
i have folder structure as below :
repo1
|
|---file1
|---fold1
|
|---file2
|---repo2
|
|
|---file3
Lets say i have two users, user1 and user2.
Now i need to :
setup repo1 and ...
2
votes
2
answers
45
views
How to prohibit modifications to all files in a revision control system
For an archive of test data I need a revision control system that allows only the addition of files. Modifications, renaming and any other changes are prohibited.
This will make it possible to test ...
0
votes
1
answer
470
views
Why is Querydsl looking for incorrect generated entities?
I am having an issue where I will get a ClassNotFoundException error when I try to run Junit tests. The query classes that are generated are QSomeTableEntity_Q but it keeps looking for ...
5
votes
2
answers
2k
views
DDD. Should I modify a entity inside a repository?
I have a question about implementing DDD and repository pattern.
Should I modify a entity inside a repository?
Let's say I have an Order and want to mark that order as finished.
As I see this I have ...
1
vote
1
answer
2k
views
Laravel Repository Pattern Best Practice
I'm writing a new project with laravel 5.1, and I want to use the repository pattern, but I can't figure out what is the best way of doing that.
I was thinking about:
public function save(User $user)...
4
votes
2
answers
194
views
how to implement a repository of algorithms?
I have a set of algorithms implemented in Java and packaged as jar files. The algorithms are intended for 3rd party to access them. The algorithms have several variations. Overtime, new versions and ...
0
votes
1
answer
169
views
When using the Repository Pattern in Java, is it ok to use a single Manager/Controller for 3 different Repositories?
I have 3 repositories that need to communicate with each other. Can I handle the logic of all 3 repositories in a single Manager or is it a better practice to create different Managers for each ...
-1
votes
1
answer
145
views
Bootstrap hide some colls on mobile
I want on desktop show all cols (5) on mobile only 3. It's possible do with standart bootstrap classes ?
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class=" col-lg-...
0
votes
2
answers
4k
views
EntityBase and IAggregateRoot Reference not found?
I am trying build a repository, so I found this link explained very well but I got error
Error 1 The type or namespace name 'EntityBase' could not be found
(are you missing a using directive ...
8
votes
2
answers
2k
views
Is putting all project dependencies inside project's repository good practice?
I have a project that uses couple (for now ~6) dependencies (other libraries). Most of them are on MIT/simplyfied BSD licences so it should not be a problem to just copy them to my repo.
Would it be ...
12
votes
2
answers
2k
views
How do I track "dot" configuration files in my home directory with git?
I have a number of "dot" files in my home directory that I'd like to track with git - e.g. .pryrc, .zshrc, etc. I want to have a remote repository for these files so that a) there is an easy way to ...
1
vote
0
answers
486
views
How to manage one giant TFS team project which has multiple projects in JIRA
I could not find a solid solution where the situation and condition are very rare. We have a big project that has multiple projects (vs solutions) in TFS. They had some reasons that they decided to ...
5
votes
2
answers
14k
views
Dispose method in web api 2 web service
I am coding an MVC 5 internet application with a web api 2 web service. Do I need a dispose method for the DbContext class in a web service? It is not there as default.
1
vote
1
answer
561
views
Repository pattern design for multiple DbSets [duplicate]
I am coding a MVC 5 internet application, and I am now starting to code a generic repository class for each of my controllers.
My question is this: Should I code a different repository for each ...
1
vote
0
answers
45
views
Are SVN repo versions copies or just references?
This may be a very elementary question, but I can't find an answer anywhere. I'm new to SVN and trying to determine the best configuration for my repo for a new project. This project is essentially ...
1
vote
1
answer
1k
views
Repository & Unit of Work Design Pattern
This may be more about personal preference than anything but I have been trying to wrap my head around using the Repository and Unit of Work pattern yet I have seen to very different uses and would ...
0
votes
1
answer
1k
views
Laravel App::make causes infinite loop
I'm creating some project management functionality.
I'm using Model Observers in Laravel to create an audit trail whenever models are created/updated/deleted. So for example when a project is ...
2
votes
1
answer
235
views
laravel 4 how to implements repository for polymorphic relations
I have vehicle class morphTo(Bus) and MorphTo(SUV) and MorphTo(Sedan).
When saving in VehicleController, I called vehicleRepositoryInterface, vehicleRepository.
How can I save Bus or SUV or Sedan ...
21
votes
1
answer
20k
views
Is there a preferred path where I should initialise my Git repo on Mac OS X?
Where should I be building my repos? My tutorial repos went to root, but I thought since I would have a test of my production site, that I should build them in ~/sites/.
It might seem trivial, but ...
0
votes
2
answers
93
views
Repository with entities not including linked entities
i'm trying the following.
I have a repository that returns a list of Deposits.
I also want to get the entities that are related to the Deposit-entity (i.e. contract)
I'm not getting it done.
Can ...
1
vote
2
answers
84
views
Multiple repositories as one in mercurial
I'm in trouble figuring out how to organize a mercurial repository for a Django project I'm starting. This is the current configuration:
.
├── .hg
├── docs
├── manage.py
├── project
│ ├── __init__....
0
votes
2
answers
1k
views
Should a repository throw custom exceptions or return a status type?
I have web app and a repository that sets a transaction record to 'done'. The requirement is to check at repository level if the requirement has been set already to 'done' by another user, when so, ...
1
vote
2
answers
433
views
Should repository services know about transaction information?
I'm using NHibernate in conjunction with Repository Design Pattern. In current task, I need to update an entity and also delete another entity in the same transaction. I though about declare ISession....