repository

Repository Pattern without LINQ or other ORM?

Deadly 提交于 2019-12-04 04:24:31
问题 Does it makes sense to use the Repository pattern without the use of LINQ or some other ORM? I am writing an application in MONO and using MySQL, was thinking of using the repositoy pattern but not going to be able to deal with IQueryable. I was thinking of just exposing more methods on the repository to make it obvious that filtering was going to happen on the db side with the repository call. Any suggestions if that is a valid use of the design or any other design ideas instead? 回答1:

Bzr: Create a shared repository from an existing stand-alone repository

僤鯓⒐⒋嵵緔 提交于 2019-12-04 04:11:06
I have been using Bzr for version control of my project over the last few months. I am the sole developer, and currently I just have everything in a single local project directory, to which I commit and which I sync to DriveHQ. I now have some large-scale experiments in mind which would likely break this main line, so I've been looking into the concepts of branches and shared repositories. So my question is, basically: how should I go about creating a new, shared repository from this already-version-controlled base? I am familiar with the SVN project structure of trunk, branches and tags, and

Symfony2, Doctrine search and order by distance

前提是你 提交于 2019-12-04 03:37:14
问题 I have a database of places which I store the latitude and longitude for. I want to query the database to find all places within a radius ( $requestedDistance ) of a specific latitude ( $latitude ) and longitude ( $longitude ). The below query works and returns only those places within this radius, however how would I order them by distance so the closest is first? In the past, using raw SQL I have done the calculation within the SELECT statement and set it as 'distance' and then used HAVING

ASP.NET MVC: How many repositories?

别等时光非礼了梦想. 提交于 2019-12-04 03:02:54
I am in the process is designing a website in ASP.NET MVC and am perhaps a little confused as to the exact nature of a repository. Following the NerdDinner example, my site should have one repository which serves up the entities as I need them. However, I have also heard that you should have different repositorys that deal with specific sets of related entities....? In the case of my site, there will be a number of entities (around 15 tables) yet the majority are all related. Is it ok / advisable to have one repository that contains all the methods that I'll need for pulling / updating /

Saving entity in repository does not work SPRING

孤者浪人 提交于 2019-12-04 02:31:13
I'm trying to save entity in repository but it does not work at all. Repository is Autowired and in runtime I use saveAndFlush to save entity. I'm using PostgreSQL. Above test methods I added comments with explanation what is going on. I expected that method saveAndFlush should work but it did not. I can not find why. @Transactional public class TestClass{ @Autowired private MyRepository repository; @Autowired private EntityManager entityManager; // Working version public void writingToRepositoryWorking() { entityManager.getTransaction().begin(); entityManager.persist(new MyData(99));

How do you use Git to retrieve just one (or a few) files from a repo? [duplicate]

廉价感情. 提交于 2019-12-04 02:15:41
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Partial clone with Git and Mercurial I switched into the specific directory into which I'd like my repo file to be copied into, and then tried the following: git clone git@github.com:path/to/file.java but it's giving me ERROR: repository not found Can anyone tell me what's going on, and what's the right thing to do? (a little background doesn't hurt!) 回答1: You may want to look into something called a sparse

Repo browser in svn “Repository moved permanently to… please relocate”

早过忘川 提交于 2019-12-04 01:11:47
In the repo browser when I enter the svn root ( http://servername/svn ) directory I get this message "Repository moved permanently to 'http//....' please relocate There are several projects in this repository and I can access/checkout/update each project but I can't even access the root. How can I fix this? I'm assuming that you're not the server admin and that you're relatively new to svn... You'll need to tell your working copies that the remote repo has moved (see the svn book for info on how to do this ). You'll also need to use the new root for your remote repo browsing. I got the same

Multiple Git repositories in one directory

偶尔善良 提交于 2019-12-04 00:48:53
问题 I would like to deploy a directory to multiple developers having different permissions. So this is one thing Git cannot do. What about creating two repositories in one directory and assigning them different file lists by excluding files managed by the other repository with the .gitignore file. Example: /www/project/.git for all files except in /www/project/css /www/project/css/.git -> only files in this directory Has anyone tried this solution? Or are there any better ways to handle this

Create a new repo from sub folder in Mercurial Repo using convert

依然范特西╮ 提交于 2019-12-04 00:41:07
I am trying to extract a folder (call it Project1 ) from an existing Mercurial Repo (call in MainRepo ) using the Convert extension for Mercurial to Mercurial conversion. I have followed the methods described by Mercurial developers (and elsewhere on the web) under Windows XP: C:\MainRepo>echo include Project1 > ~myfilemap C:\MainRepo>echo rename Project1 . >> ~myfilemap C:\MainRepo>hg convert --filemap ~myfilemap . C:\Project1Repo C:\MainRepo>cd \Project1Repo C:\Project1Repo>hg update This creates the new repo (Project1Repo) with the Mercurial folder/files in place. But it does not: 1) Carry

Can't get composer “path” repository to work

浪尽此生 提交于 2019-12-03 22:12:40
I have a directory structure like so: composer.json < Main packages/ balunker/ testpackage/ composer.json < Package src/ TestPackage.php The main composer.json looks like this: { "name": "vagrant/composer-test", "repositories": [ { "type": "path", "url": "packages/*/*" } ], "require": { "balunker/testpackage": "*" } } While the package composer.json looks like so: { "name": "balunker/testpackage", "autoload": { "psr-4": { "Balunker\\": "src/" } } } On composer update I simple get a message that the package could not be resolved. No symlinks are created and no package is installed. I have