repository

Declarative transactions (@Transactional) doesn't work with @Repository in Spring

只谈情不闲聊 提交于 2019-11-27 06:12:54
问题 I'm trying to make simple application using Spring, JPA and embedded H2 database. Recently I've come across this strange issue with declarative transactions. They just doesn't commit if I autowire my DAO with @Repository annotation. More specifically I get exception on flush: javax.persistence.TransactionRequiredException: Exception Description: No transaction is currently active Here is my setup: persistence.xml <persistence-unit name="schedulePU" transaction-type="RESOURCE_LOCAL"> <provider

How do I rename both a Git local and remote branch name?

痴心易碎 提交于 2019-11-27 05:46:12
I have four branches like master -> origin/regacy, FeatureA -> origin/FeatureA. As you can see, I typed the wrong name. So I want to rename a remote branch name (origin/regacy → origin/legacy or origin/master) I try the command below: git remote rename regacy legacy But Git console returned an error message to me. error : Could not rename config section 'remote.regacy' to 'remote.legacy' How can I solve this problem? CodeWizard You can't directly rename a remote branch. You have to delete it and then re-push it. Renaming a branch # Rename the local branch to the new name git branch -m <old

What is the difference between the Data Mapper, Table Data Gateway (Gateway), Data Access Object (DAO) and Repository patterns?

我怕爱的太早我们不能终老 提交于 2019-11-27 05:45:56
I'm trying to brush up on my design pattern skills, and I'm curious what are the differences between these patterns? All of them seem like they are the same thing - encapsulate the database logic for a specific entity so the calling code has no knowledge of the underlying persistence layer. From my brief research all of them typically implement your standard CRUD methods and abstract away the database-specific details. Apart from naming conventions (e.g. CustomerMapper vs. CustomerDAO vs. CustomerGateway vs. CustomerRepository), what is the difference, if any? If there is a difference, when

How can I index our internal source code?

心已入冬 提交于 2019-11-27 05:22:42
问题 Google Code Search has indexed Subversion and Mercurial repositories, so people can search open source projects. How can I do the same for my company's repository with the least effort and without publishing our code? We have Trac (with Subversion) at our shop, but it only indexes Changesets, and we also have Visual Source Safe. 回答1: A quick Google turned up VoilaSVN but I cannot vouch for it. Edit: It also turned up OpenGrok which appears to have a lot more support for other systems. 回答2: I

What do the *-dev packages in the Linux package repositories actually contain?

 ̄綄美尐妖づ 提交于 2019-11-27 05:12:50
问题 My question is very basic, as is my knowledge right now. I'm a long-time Linux user, but have only recently taken a major interest in programming. I see that many popular applications in the Ubuntu repositories have -dev packages (e.g. pidgin-dev in addition to pidgin ). My question is this: What is in these packages? How does downloading pidgin-dev help one to develop for Pidgin? Is it as simple as a dependency check for the tools necessary to create the plugins for the given application? I

Using someone else's repo as a Git Submodule on GitHub

*爱你&永不变心* 提交于 2019-11-27 05:06:38
问题 I am trying to find out if it is possible to use someone else's repository (or branch of a repository) as a Submodule in your own Git repository. Documentation on github itself is either missing, or I'm not using the right terminology to look for it. If this isn't the preferred way to go about including a public repository as a shared library within ones git project, suggestions as an alternative best practice would be appreciated. 回答1: Yes, you can add any repository as a submodule in your

IQueryable & Repositories - take 2?

孤者浪人 提交于 2019-11-27 04:56:21
I have to admit I have been carrying the "Repository should not return IQueryable" banner because it is harder to test. I have been influenced by the answers to other questions like this and this . This morning I've been reading ScuttGu's blog about ASP.NET vNext where he details Model Binding using a SelectMethod that seems to rely on IQueryable for paging and sorting. Do you think this will force us to reconsider the role IQueryable plays in repositories? DDD Repository should encapsulate data access technicalities: Definition: A Repository is a mechanism for encapsulating storage, retrieval

How to convert a GIT repo to a submodule, which is nested in another (parent) GIT repo?

若如初见. 提交于 2019-11-27 04:44:48
问题 I have a GIT repo which has subfolders as GIT subrepositories. + main (local GIT repo) + subdirectory1 + plugin1 (created as local GIT repo) + plugin2 (created as local GIT repo) + subdirectory2 + subdirectory2a + plugin3 (created as local GIT repo) + subdirectory3 The plugin1, plugin2, plugin3 are subfolders (subrepos) of main GIT repo. Also plugin1, plugin2, plugin3 were initiated as local GIT repos and has content & history added. I would like to convert plugin1, plugin2, plugin3 GIT

ASP.NET MVC / EF4 / POCO / Repository - How to Update Relationships?

ε祈祈猫儿з 提交于 2019-11-27 04:00:59
I have a 1..* relationship between Review and Recommendations . The relevant portion of my model (which is also the POCO mapped by EF4): public class Review { public ICollection<Recommendations> Recommendations { get; set; } } On an Edit View , i represent the Recommendations as a set of checkboxes. When i try and add a new Recommendation as part of editing the Review (e.g check another box), nothing is happening - and i know why... I use the "stub technique" to update my entities - e.g i create a entity with the same key, attach it to the graph, then do ApplyCurrentValues . But this only

How exactly does subversion store files in the repository?

我是研究僧i 提交于 2019-11-27 03:48:53
I read the subversion book and it is clear to me that subversion does not store individual files but only deltas in order to minimize disk space. Subversion also does the same with binary files as well (this used to be a huge weakness of CVS). However I do not understand the exact mechanism. When I commit a file what happens? Subversion stores only the diff (and already has the old version) Subversion deletes the previous version, stores the new file intact and creates a reverse diff in order to "re-create" the old version if needed. Something else that I haven't thought of. The first case