repository

TYPO3 / How to make repository from existing table fe_users?

随声附和 提交于 2019-11-29 07:41:10
I am creating a special BE module with Extbase and Fluid and I need a domain object which would be representing standard FE user. When I create new domain object called e.g. Feuser and save it, the extension builder creates special repository and also wants to create special table tx_myextkey_feuser in database. But this table already exists as fe_users . Is possible to tell typo3 that the repository for Feuser objects already exists (as fe_users table) and that typo3 should use the existing one? How can I do that? I need it because the extension (including this BE module) needs to have every

How to automatically align/sync a forked Github origin/master branch to upstream/master?

喜你入骨 提交于 2019-11-29 06:44:30
Is there a way to automatically sync my forked Github repository's remote master branch ( origin/master ) to an original Github repository's master branch? ( upstream/master ) I ask because I would like my forked remote origin/master branch on Github to always stay up-to-date so that I could save time by not needing to continually pull / rebase & push upstream repository changes into my forked repo's master branch. It is very easy to sync forked repository but question is how ? In this example i am using WorldMapGenerator Repository Go to your forked repository, you can see setting button

What does it mean <S extends T> save (S entity); in Spring Repository?

こ雲淡風輕ζ 提交于 2019-11-29 06:26:53
In Spring Data project the CrudRepository provides sophisticated CRUD functionality for the entity class that is being managed. public interface CrudRepository<T, ID extends Serializable> extends Repository<T, ID> { <S extends T> S save(S entity); T findOne(ID primaryKey); Iterable<T> findAll(); Long count(); void delete(T entity); boolean exists(ID primaryKey); // … more functionality omitted. } In general, I know what "S extends T" means, i.e. that S, the return type of save operation, must be subtype of T. Why is it necessary to add such as constraint? I think that would be fine doing

How can I rename a git repository with submodules?

自古美人都是妖i 提交于 2019-11-29 06:14:54
I have a git repository with submodules in the directory projects/myRepo and I want to rename the directory to projects/my-repo . According to this question it can simply be done with mv . But in a repo with submodules git keeps telling me fatal: Not a git repository: projects/myRepo/.git/path/to/submodule``` even for git status . Submodule config: [submodule "path/to/submodule"] path = path/to/submodule url = https://github.com/user/projectName.git Somehow the 'internal path' for the submodule does not get updated?! Is there a way to tell git to update these submodule paths? VonC Since Weston

DDD and implementing persistence

牧云@^-^@ 提交于 2019-11-29 06:07:45
问题 I am getting my feet wet with DDD (in .Net) for the first time, as I am re-architecting some core components of a legacy enterprise application. Something I want to clear up is, how do we implement persistence in a proper DDD architecture? I realize that the domains themselves are persistence ignorant, and should be designed using the "ubiquitous language" and certainly not forced into the constraints of the DAC of the month or even the physical database. Am I correct that the Repository

Maven repository hosting for non-public artifacts? [closed]

情到浓时终转凉″ 提交于 2019-11-29 05:56:55
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Is there some hosting solution, be it paid or free, that offers explicit maven repository hosting for non-public artifacts, preferably with support? These are the alternatives I'm aware about: Hosting on your own public server with credentials For open source projects, there is free sonatype hosting Hosting on

Entity Framework relationships between different DbContext and different schemas

淺唱寂寞╮ 提交于 2019-11-29 05:44:05
So, I have two main objects, Member and Guild. One Member can own a Guild and one Guild can have multiple Members. I have the Members class in a separate DbContext and separate class library. I plan to reuse this class library in multiple projects and to help differentiate, I set the database schema to be "acc". I have tested this library extensively and can add, delete, and update Members in the acc.Members table. The Guild class is as such: public class Guild { public Guild() { Members = new List<Member>(); } public int ID { get; set; } public int MemberID { get; set; } public virtual Member

Update method for generic Entity framework repository

北慕城南 提交于 2019-11-29 04:56:04
I have a repository like that: public class Repository<T> : IRepository<T> where T : class { private readonly IRepositoryContext _repositoryContext; public Repository(IRepositoryContext repositoryContext) { _repositoryContext = repositoryContext; _objectSet = repositoryContext.GetObjectSet<T>(); } public virtual void Update(T entity) { ObjectSet.AddObject(entity); _repositoryContext.ObjectContext.ObjectStateManager.ChangeObjectState(entity, EntityState.Modified); _repositoryContext.SaveChanges(); } } Now that actually works for all scalar properties of the entity, but all the other entities

IQueryable Repository with StructureMap (IoC) - How do i Implement IDisposable?

一笑奈何 提交于 2019-11-29 04:48:44
If i have the following Repository: public IQueryable<User> Users() { var db = new SqlDataContext(); return db.Users; } I understand that the connection is opened only when the query is fired: public class ServiceLayer { public IRepository repo; public ServiceLayer(IRepository injectedRepo) { this.repo = injectedRepo; } public List<User> GetUsers() { return repo.Users().ToList(); // connection opened, query fired, connection closed. (or is it??) } } If this is the case, do i still need to make my Repository implement IDisposable? The Visual Studio Code Metrics certainly think i should. I'm

Dependencies between domain object, factory and repository

ε祈祈猫儿з 提交于 2019-11-29 04:30:42
Ok i read many things about the repository pattern, including Fowler's book. I know pretty good what it is and what it does, however what i'm not quite sure yet is how it is called by factories and/or domain objects. What I understood is that the repository is supposed to act like an in-memory collection of domain object, and the factory is the class in charge of the instance creation: new myDomainObject() With that in mind, it seems obvious that the repository will need a reference to the factory to create new objects from the data source queries. (Repository -> Factory) Domain objects also