ORM tools for Java
Any ORM tools available for java other than Hibernate, with high scalability. ...
Any ORM tools available for java other than Hibernate, with high scalability. ...
Im having a hard time understanding how inheritance works with NHibernate, with regards to mapping with .hbm.xml files. ...
How can I use "inheritance" in Annotations? What are the advantages of using inheritance in Annotations? ...
I'm trying to see if it's possible to implement a repository as a java.util.Collection (most likely a Map). Something along these lines: @Repository public abstract class HibernateRepository<K extends Serializable, V> extends AbstractMap<K, V> { @Autowired private SessionFactory sessionFactory; private Class<K> keyCla...
We have a java server connecting to a MySQL 5 database usingHibernate as our persistence layer which is using c3p0 for DB connection pooling. I've tried following the c3p0 and hibernate documentation: Hibernate - HowTo Configure c3p0 connection pool C3P0 Hibernate properties C3P0.properties configuration We're getting an error on ...
Is it possible to have a collection of entities that are mapped via an IUserType? For example: class Foo { public int Id { get; set; } public ISet<Special> Items { get; set; } } class Special { public Special(string columnValue) { _val = columnValue; } public override string ToString() { re...
I annotated a bunch of POJO's so JPA can use them to create tables in Hibernate. It appears that all of the tables are created except one very central table called "Revision". The Revision class has an @Entity(name="RevisionT") annotation so it will be renamed to RevisionT so there is not a conflict with any reserved words in MySQL (th...
Here is source code: @OneToOne(fetch = FetchType.LAZY) @Cascade({SAVE_UPDATE, EVICT, DELETE}) @JoinColumn(name = "A_ID", nullable = true) private A a; @OneToMany @Cascade({SAVE_UPDATE, EVICT, DELETE, DELETE_ORPHAN}) @JoinColumn(name = "B_ID") private List<B> bList; What is the difference between DELETE_ORPHAN and DELETE ? ...
Hello all, I've run into a problem I can't figure out and Google search does not return much (I should of thought about posting my question here first ;-). So I've got a GWT app, that makes a rpc call to a server to save/create a new entity. However, the Spring-Hibernate back-end throws an exception with the following error message: ...
Is it somehow possible to see the DDL produced when opening a EntityManagerFactory in JPA? I seem to be having some problems but no errors are produced. I don't see any sort of log file and no output is written to StdOut or StdErr. I have a log4j.properties in src/main/resources: log4j.appender.stdout=org.apache.log4j.ConsoleAppende...
Is there a relatively simple way to reverse engineer a database from the command line and generate Hibernate artifacts based on the database? the only info I've been able to find on doing this requires jumping through lots of hoops with Hibernate tools that weren't designed for command line use, and ant build files. ...
I'm trying to propagate the schema from the Hibernate configuration to the RDBMS. The code runs without any error message but the database doesn't get updated. Any hints ? Thank you ! Update That is hibernate-core only with a HSQL database. Update 2 Yes, i should use SchemaExport (i'm away from hibernate a while ),but it don't flush ...
I haven't been able to get any more console output (to help with debugging) from Hibernate despite setting a few properties in the hibernate.cfg.xml file. For example, adding the line <property name="show_sql">true</property> did not, in fact, show SQL statements in the console. I've also tried playing around with the contents of the lo...
I have the following POJO: public class SampleBean1 { @Id @GeneratedValue(generator = "system-uuid") @GenericGenerator(name = "system-uuid", strategy = "uuid") protected String id; @OneToOne(cascade=CascadeType.ALL) @JoinColumn(name="OneToOneID") protected SampleBean1 oneToOne; @OneToMany(cascade=Casca...
When I configure hibernate to connect to a DB and for some reason the connection fails, I noticed that it doesnt throw any exception neither when building the factory (which is acceptable) nor when I call sessionFactory.openSession() (which is less acceptable). What is more annoying is that session.isConnected() returns true after I call...
Hi, I have a pretty complex database schema and would like to know if there are any tools which I can use to auto-generate the entities if I am using Hibernate as my persistence mechanism. Thanks. ...
The following snippet generates create / drop sql for a particular database, whenever there is a modification to JPA entity classes. How do I perform something equivalent of a 'for' operation where-in the following code can be used to generate sql for all supported databases (e.g. H2, MySQL, Postgres) Currently I have to modify db.grou...
Hi I am facing data truncation issue with hibernate for DB2 Char datatype. I am getting only the first character for DB2 char datatype using hibernate. I looked through the net and got two threads with similar issues. These two threads mentions either to modify the dialect or cast as char in sql query. below are the two similar threa...
Hi! Is there a way one EntityManager can participate smoothely in multiple concurrent transactions? Well, not that concurrent. Something like: Start tx 1 Do stuff in tx 1 Start tx 2 Do stuff in tx 2 Commit tx 2 Join tx 1 back Do stuff in tx 1 Commit tx 1 with steps followed one by one not overlapping. ...