persistence

Whats the best feature of the ORM framework you use [closed]

随声附和 提交于 2019-12-03 11:17:40
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. I'm wondering what the best feature(s) of the orm framework you use and what features you find yourself using most? What is the reason you chose the framework you use? I'm just trying to compare them and wondered if any offers advantages over the other. (it

OSGi + Hibernate

微笑、不失礼 提交于 2019-12-03 09:48:03
问题 Instead of having database actions scattered in four (osgi) bundles, all doing there slightly different things. I want to create a (simple) OSGi bundle that is responsible for all persistance issues. I feel that this is not as simple as it sounds because of the "unique classloader per bundle" thing. So what I really would appreciate is if someone knows the solution(s) to this kind of problem. 回答1: (If you are using Hibernate Annotations) Save all the Entities class loaders when the Hibernate

How mature is Ebean or Siena? [closed]

谁说我不能喝 提交于 2019-12-03 09:33:06
Closed . This question is opinion-based. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . 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 grows and you have to handle great database-tables, you know if they are good or not. So it's really difficult

The import javax.persistence cannot be resolved

自作多情 提交于 2019-12-03 09:26:45
I'm currently working on a project that requires EntityManager EntityManagerFacotry and Persistence each from the javax.persistence package. It seems to be for the database service, but the current code is not very well documented. By searching google it seems that there should be an xml file that comes along with this, but there isn't one of those either. I guess my question is simply how do I make these unresolved imports go away? Do I have to add another jar to the build path? It seems that I shouldn't have to since it's been around since 1.5. Any help is greatly appreciated. Karthik Reddy

EJB3 and manual hierarchy persistence

眉间皱痕 提交于 2019-12-03 09:11:12
I have a legacy database, which I am using EJB3 to model. The database is in quite a poor shape, and we have certain unusual restrictions on how we insert into the DB. Now I want to model the database in a hierarchy that fits in with the DB strucuture, but I want to be able to manually insert each entity individually without the persistence manager trying to persist the entities children. I am trying something like the following (boilerplate left out): @Entity @Table(name = "PARENT_TABLE") public class Parent { @Id @Column(name = "ID") int id; @OneToMany List<Child> children; } @Entity @Table

Two Persistence Unit in one Persistence.xml

大憨熊 提交于 2019-12-03 09:04:42
问题 We created some libraries that all our projects will use, this libraries will provide the basic functionality of all our systems (login, some manage, etc). But the application itself could use another database. What we did was to create the Persistence.xml with two persist units. And package all the core library entities in a jar called "LN-model.jar" and all of the entities of out test app in "App-model.jar". But for some reason we still obtain the following message. Could not resolve a

Persistence and Domain Events with persistence ignorant objects

一个人想着一个人 提交于 2019-12-03 07:50:49
问题 I've been studying on domain driven design in conjunction with domain events. I really like the separations of concerns those events provide. I ran into an issue with the order of persisting a domain object and raising domain events. I would like to raise events in the domain objects, yet I want them to be persistence ignorant. I've created a basic ShoppingCartService , with this Checkout method: public void Checkout(IEnumerable<ShoppingCartItem> cart, Customer customer) { var order = new

Persistence solutions for C++ (with a SQL database)?

时光毁灭记忆、已成空白 提交于 2019-12-03 07:46:04
问题 I'm wondering what kind of persistence solutions are there for C++ with a SQL database? In addition to doing things with custom SQL (and encapsulating the data access to DAOs or something similar), are there some other (more general) solutions? Like some general libraries or frameworks (something like Hibernate & co for Java and .NET) or something else? (Something that I haven't even thought of can also be welcome to be suggested) EDIT: Yep, I was searching more for an ORM solution or

Update an existing JobDataMap

陌路散爱 提交于 2019-12-03 07:20:49
问题 I have a Quartz job that has already been scheduled. I want to update the JobDataMap associated with it. If I get a JobDataMap with JobDataMap jobDataMap = scheduler.getJobDetail(....).getJobDataMap() , is that map "live"? ie. if I change it, will it be persisted in the scheduler? If not, how do I persist it? 回答1: See http://www.quartz-scheduler.org/docs/tutorial/TutorialLesson03.html: A Job instance can be defined as "stateful" or "non-stateful". Non-stateful jobs only have their JobDataMap

Selecting between shelve and sqlite for really large dictionary (Python)

白昼怎懂夜的黑 提交于 2019-12-03 07:01:28
I have a large Python dictionary of vectors (150k vectors, 10k dimensions each) of float numbers that can't be loaded into memory, so I have to use one of the two methods for storing this on disk and retrieving specific vectors when appropriate. The vectors will be created and stored once, but might be read many (thousands of) times -- so it is really important to have efficient reading. After some tests with shelve module, I tend to believe that sqlite will be a better option for this kind of task, but before I start writing code I would like to hear some more opinions on this... For example,