SQL « Schema « JPA Q&A





1. SQL Schema to Hibernate Class    stackoverflow.com

I got an existing table in Oracle database how can I generate my Hibernate Java class etc from this table? Using Eclipse 3.2, Java 5

2. Hiberate variable schema name in SQL named query    stackoverflow.com

Other than default schema, for some SQL queries I need to access a particular schema. The issue is that the name of that particular schema is different for different environments. After goggling ...

3. JPA/Hibernate - updating database schema after changing PK of an entity    stackoverflow.com

I need to change the primary key (@Id) of an entity from natural key to a new field that represents a surrogate key (it will use @GeneratedValue(strategy=GenerationType.AUTO)).
What is the easiest way ...

4. How to change the name of import.sql file in SchemaExport    forum.hibernate.org

With Hibernate-Tools https://www.hibernate.org/255.html you have different possibilities to create your schema on database. One of the possibilities is using ANT: Code: ...

5. SQL Functions in Hibernate Annotations / schema creation    forum.hibernate.org

Hi, I want to use create a function based index with hibernate and oracle. (A function based index in oracle is an index which uses SQL functions like MAX, MIN, but DESC as well.) I think about something like: @Table(appliesTo ="TESTTABLE", indexes = { @Index(name="test_idx", columnNames = {"testColumn1 desc", "MAX(testColumn2)"}) }) which doesn't work this way! I don't want to do ...

6. Hiberate variable schema name in SQL named query    forum.hibernate.org

Hi, Other than default schema, for some SQL queries I need to access a particular schema. The issue is that the name of that particular schema is different for different environments. After goggling I found that using this linkI am able to specify the schema name in variable. If thats true that I have following questions: 1. Will that would for ...

7. SchemaUpdate between two sql files    forum.hibernate.org

Hello, I have two files .sql, which are create by SchemaExport in two different projets. One is the old version and the second the new version of my data base schema. I search a tool to create the update schema between the two files like SchemaUpdate, which does it between a configuration and a data base. anyone can help me Thanks ...

8. Schemaexport doesn't produce valid SQL    forum.hibernate.org

jdbc:hsqldb:database/liberty.db org.hsqldb.jdbcDriver SA true ...

9. schemaexport generated sql    forum.hibernate.org

Hi I'm get the following error from schemaexport (2.1.6) when running it against mysql 4.0.21. When I copy and paste the statement into a mysql console, it parses ok thou. Cas -- create table job (job_id bigint not null auto_increment, title varchar(255), des cription varchar(255), location varchar(255), country varchar(255), starting var char(255), duration varchar(255), rate varchar(255), reference varchar(255), pos ted datetime, ...





10. schemaexport produces incompatible SQL for MySQL 4.1.9    forum.hibernate.org

Syntactically they are but MySQL/InnoDB complains if you try to "alter table .. drop foreign key..." on a table that does not exist. There isn't an equivalent "if exists" statement extension that can be added in the same way as "drop table ..." uses it. The error reported by MySQL seems reasonable to me. I have no knowledge of whether other ...

12. Custom SQL after SchemaExport    forum.hibernate.org