Record « Database « JPA Q&A





1. Hibernate is overwriting my database records    coderanch.com

Hi, I'm new to Hibernate, and am just trying it out via a simple, throw-away Swing-based application. I am using MySQL and the org.hibernate.dialect.MySQLDialect. My class in question is Genre, containing the fields: private Long id; private String name; private String description; It contains appropriate getters and setters, along with a no-parameter constructor. The setter for the "id" field is private, ...

2. i was not able to add a record to my database    forum.hibernate.org

tnkx for replying me here is the complete list of things that i've done so far 1. i copy mysql-ds.xml to deploy folder then i also set the datasource in standardjbosscmp-jdbc.xml under conf folder. lastly i copied mysql-jdbc2-service.xml to jms folder under deploy 2. i created a folder dev.war inside i hav meta-inf and web-inf. under web-inf i have lib, classes, ...

3. How check that database record is not changed outside    forum.hibernate.org

Hi, We need to add functionality in the system that will detect if data has been changed directly in the database, some kind of record's checksum. I would appreciate help pointing me to the possible implementation scenario. Of course, not entities in the system should be tracked, thus we should be to 1. identify entity to be checksumed 2. onSave / ...

4. Unreferenced records in the database    forum.hibernate.org

In the past 2 weeks Ive browsed your forums and googled through the web in attempt to find a lead for the problem were facing. I found several posts on this topic that suggested similar mappings to what is currently defined at our project. However, in most of the cases the business logic was different, which I guess explains, why only ...

5. No records in DB    forum.hibernate.org

Newbie Joined: Tue Feb 26, 2008 1:26 pm Posts: 6 Hi, I have the following problem: I have this class: public class HRecordManager { private Session session = null; public HRecordManager(Session session) { if(session == null) throw new RuntimeException("Invalid session object. Cannot instantiate the UserManager"); this.session = session; } public void saveRecord(RequestRecord record){ session.beginTransaction(); session.persist(record); } and the mapping for the ...