1. EJB Find persisted data in single transaction stackoverflow.comLet's say i have two tables in db: Car and Part. Car owns arbitrialy number of parts. Because i use EJB 3.0 i have entity beans for Car and Part and Car ... |
2. Hibernate calls flush on find- causes not-null error stackoverflow.comI have a process which updates a tree to the database, and in doing so, performs reads to check for duplicates entities. I'm finding that trying to do a criteria.uniqueResult() midway through ... |
3. Updating in a REQUIRES_NEW then finding in a different transaction returns old data. Why? stackoverflow.comThis question is best described by a picture I think. I hope someone can help me. Thanks |
4. jpa 2 hibernate setting a lock on EntityManager.find stackoverflow.comI'm doing a few testcases on an hibernate project: when I call
I get the entity as I expect, but when I invoke:
I'm ... |
5. How to define an non-JTA datasource for JPA-Hibernate? org.hibernate.connection.DatasourceConnectionProvider - Could not find datasource: stackoverflow.comI am trying to change my web-app's JDBC code to JPA using Hibernate as provider. I am using Eclipse IDE. In that i have defined a MySQL data source. I added ... |
6. Help me find the deadlock stackoverflow.comThis is the first time I see this code myself where we are getting deadlock.
Here is the code: (Java/pseudocode)
|
7. org.hibernate.exception.JDBCConnectionException: could not insert, How To Find the problem in a production enviroment stackoverflow.comWhere do you start when you have these problems? I'm having problems recreating these error in my development environment. We are running this code on resin server. And we have plugins ... |
8. Find or create within existing transaction forum.hibernate.orgI need to write a method which can find or create an object based on a unique but non-primary key. As an example say I have a Person class as defined below: Code: public class Person { @Id @GeneratedValue(strategy = IDENTITY) private int id; @NaturalId ... |
9. Concurrency, second call to find() function failed forum.hibernate.org |
10. Is it necessary to wrap a simple find() in a transaction? forum.hibernate.orgIs this considered a 'best practice' for some reason? Why would this be? Example: Transaction tx = session.beginTransaction(); List blahList = session.find("from Blah"); tx.commit(); Not sure why I would 'need' to do this, but lots of examples in the manual do it this way. If I do have to do this for some reason, do I also need to rollback() if ... |
11. Find a newly inserted record in the same transaction forum.hibernate.orgI am using Oracle 9i and have a table that generates the primary key using an insert trigger. In my Java code, I create a new object and save it to the database then, in the same transaction, I want to look up the inserted record by its name field to get the generated primary key. THe idea is begin transaction ... |
12. find method in different transactions forum.hibernate.orgHi everybody, The problem that i am facing is the following: I have two different transaction: A and B. 1.I start the trans A ( in the debug mode ) and in the middle of this transaction, i also start trans B that modifies some data. 2. I commit the transaction B. 3.I try to see the modifications in trans A ... |
13. Concurrent "find or create" design issue forum.hibernate.orgHi, I have a design issue in my code, I need to do a "find or create" an entity in massive concurrent code. My goal is to rely on DB locking mechanism to handle this and avoid restarting the whole transaction in case of a concurrent issue (I have to handle errors...) : Imagine a table Foo with : ID PRIMARY ... |