persistence

Store documents in file system instead of database in SharePoint document library

和自甴很熟 提交于 2019-12-10 04:13:43
问题 In a SharePoint document library, is there any way to store the documents on the file system instead of the database? 回答1: You can make SharePoint store its documents outside the DB using the SharePoint External Storage API. In other words, this isn't some functionality accessible through the SharePoint interface, but the system does offer a way of building it yourself. There are third party providers like StoragePoint that will do the job for you. 回答2: Documents in a SharePoint document

merging a detached or new entity with an existing entity in hibernate/jpa best practice question

时光毁灭记忆、已成空白 提交于 2019-12-10 01:54:46
问题 When the business layer creates a new entity, which logically represents an instance of an existing entity that should be updated (say they share the same business key), is this method of merging bad practice? public User add(User user){ User existingUser = getUserDao().findByBusinessKey(user.getBusinessKey(), false); user.setId(existingUser.getId()); user = getUserDao().merge(user); return user; } I ask because setting the ID explicitly on the detached entity feels pretty strange to me, but

Is there a way to get all managed entities from an EntityManager

a 夏天 提交于 2019-12-10 01:38:36
问题 I'm setting up a basic test data util and want to keep track of all the data that the EntityManager handles. Rather than just having a bunch of lists for each entity is there a way to grab everything being managed by the EntityManager in one fell swoop? So instead of this: EntityManager em; List<Entity1> a; List<Entity2> b; ... List<Entityn> n; cleanup() { for(Entity1 e : a) em.remove(e); for(Entity2 f : b) em.remove(f); ... for(Entityn z : n) em.remove(z); } I want something like this;

How to create multiple persistence unit Names in JBoss7.1.1.Final

↘锁芯ラ 提交于 2019-12-09 22:00:01
问题 I am upgrading jboss server 4.1.2 to jboss 7.1.1 so getting exception is 15:51:24,655 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."mobeeadmin.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."mobeeadmin.war".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment "mobeeadmin.war" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService

TransactionAttribute.REQUIRES_NEW in JPA

一个人想着一个人 提交于 2019-12-09 20:56:06
问题 I tested my ejb jpa transactions. I use Container-managed entityManager: @PersistenceContext(unitName = "ParticularUnit") EntityManager em; Such I has got transaction PersistanceContext scope and container manages each transaction. For each instance of pooled session beans, created instance of entityManager. When I mark bean method with @TransactionAttribute(TransactionAttributeType.REQUIRED) and invoke two method within, I expected then method test1 will have another PersitenceContext, but I

How to Represent Composite keys in Hibernate using Annotations?

放肆的年华 提交于 2019-12-09 14:06:09
问题 So I reverse engineered some tables from my db and when I try to save my object to the db I get the following error: Initial SessionFactory creation failed.org.hibernate.AnnotationException: A Foreign key refering com.mycode.Block from com.mycode.Account has the wrong number of column. should be 2 Exception in thread "main" java.lang.ExceptionInInitializerError The Domain objects Are Block which contains a number of Account Objects: @OneToMany(fetch = FetchType.LAZY, mappedBy = "Block")

Android: saving application state when going to the “background”

大城市里の小女人 提交于 2019-12-09 13:05:09
问题 I have a complex Android app with a decent amount of application state that needs to be persisted (in a specific format). Writing out the data is not an instantaneous operation and so it would be ideal to minimize persisting it unnecessarily. Because of the persistence overhead it is not practical to persist the state every time it is changed. Ideally, persisting state would be triggered when the app is "backgrounded" by the user tapping the 'home' button or tapping the 'back' button on the

How to open a core data database?

房东的猫 提交于 2019-12-09 08:42:51
问题 Is there any way in which I can view my core data database without having to load it programatically through the code?! 回答1: You should be able to view the database directly using the sqlite3 command line tool. The database should be stored in the following directory: ~/Library/Application Support/iPhone Simulator/User/Applications/{your application GUID}/Documents/{your application name}.sqlite To view the database, just type in the following in a terminal (note, sqlite3 should already be

How mature is Ebean or Siena? [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 08:06:54
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . In the last time I heard a lot of complaining about hibernate. And indeed I have some painful experiences with hibernate too. So I read about Ebean and Siena. Both have interesting approaches. Unfortunately, database access layers are very easy to write, but if your project

SQLite Alternatives for C++ [closed]

人走茶凉 提交于 2019-12-09 04:38: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 4 years ago . I am developing a application that needs to store data with many writes and reads as requiring fast searching of data (the need for indexes of some sort), and also be able to serialize and save the data. Currently I am thinking about using SQLite, which gets the job done, but I am open for alternatives. The