Hi
Here is my JPA2 / Hibernate definition:
Code:
@Column(nullable = false)
private boolean enabled;
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default datatype. Is there any?
...
hi all,
The title isnt clear as i couldnt think of one but, i have an EJB project and am trying
to play with JPA. To create the entity manager i am injecting it in via anotations
@PersistenceContext(unitName="testConnection")
private EntityManager em;
when i run a test qurey which i belive to be fine
Query userQuery = em.cr...
I manage to issue a Liquibase Update as described in Liquibase Servlet Listener.
<listener>
<listener-class>liquibase.servlet.LiquibaseServletListener</listener-class>
</listener>
This effectively executes my Changelog.
However, this happens after the setup of the EntityManager. Obviously, this is too late if I want my Persist...
Hello
last few hours I try to test with spring jpa 2.0 3.0
Finally I could recover objects persisted
but when I try to persist a new object I receive the following error message:
org.springframework.dao.InvalidDataAccessApiUsageException: no transaction is in progress; nested exception is javax.persistence.TransactionRequiredExceptio...
Hi, i'm been using ireport (jasperReport) for a lot of time, and everything goes fine until i begin to use ejbql connection, for this type of connection the ireport was not the best tool, And i Wanna know if there are another tool for reports based in java technology like ireport and also opensource. Thanks
...
I'd like to set the v$session.program Oracle property in order to have information available in the session table. I'm using JPA with a jndi XA datasource created with an oracle-xa-ds.xml deployed in the deploy folder of Jboss, and therefore I haven't access to the constructor of the Connection.
I have access to the Connection object, in...
I've set up a small project as a test. I'm using BlazeDS and JPA with Hibernate on my test server, and flex with with dpHibernate to access the Java entities. Each Java entity extends BaseEntity, a class that contains ID and UUID fields. The Flex entities are created by DTO2FX.
My problem is that, when I run the Flex project to try and ...
I've really taken a liking to the JBoss Seam application framework. Since the notion of injection/outjection and tight integration between JSF/EJBs/JPA is relatively scarce among Java application frameworks, I was looking for some good resources for design patterns and best practices for using this framework. I've poured over the examp...
Hibernate Gurus,
I have a pesky issue and I don't really know how to solve my problem. I have a solution, however, I feel I may be reinventing the wheel.
I have two entities, The first is a User Object, The second is an Alias Object. The relationship between the two is that A USER can have multiple ALIAS(es) and an ALIAS can be tied to...
I am learning JPA and the general pattern in examples seems to be as follows:
EntityManager em = factory.createEntityManager();
em.getTransaction().begin();
// ....
em.getTransaction().commit();
em.close();
Now I am wondering why do we continually create and close EntityManagers, as opposed to keeping it open and just starting new tra...
There's an Entity Class "A". Class A might have children of the same type "A". Also "A" should hold it's parent if it is a child.
Is this possible? If so how should I map the relations in the Entity class?
["A" has an id column.]
...
I am wondering if it is possible using annotations to persist the attributes map in the following class using JPA2
public class Example {
long id;
// ....
Map<String, String> attributes = new HashMap<String, String>();
// ....
}
As we already have a pre existing production database, so ideally the values of attributes ...
Dear members,
I am using eclipselink JPA implementation (Entity) with GWT 2.0 framework on presentation layer.
Everything is working properly. But when i change my JPA implementation to Hibernate, I get Serialization/Deserialization Exception on GWT Layer when I pass entity beans but It is okay on eclipselink JPA.
Whats really happens? H...
Hey,
I'm experimenting a bit with google app engine and the lack of a transaction di framework is missing. I'm implementing it as good as I can, but I'm hitting the same exception again and again:
can't operate on multiple entity groups in a single transaction. found both Element...
I have read the documentation (http://code.google.com/...
In a project i am working on, we have an EJB backend where various clients connect remotely (i.e. Web layer, web services layer, etc). The clients are on another machine and can be in another data center, so the front end and backend are never in the same app server.
The backend is layered as follows:
SLSB <-> Service Layer Objects <-...
Hello, in our app we use JSF & EJB 3.0 (EclipseLink 2.0). We need to use Oracle proxy authorization for every connection in our stateless session beans. For this we need to obtain DB username to connect throught proxy. DB username is constructed from JSF authenticated username by a rule.
Here is an article on topic http://blogs.oracle.c...
I have a problem when trying to update foreign keys.
Using the merge function I always get a out of memory error, or I get a timeout
Fakultaet and Standort are foreign keys in the Raum table (many to one, and lazy fetching)
Raum does eager fetching for the Fakultaet and Standort
@Stateless
@Local (IRaumHomeLocal.class)
@Remote (IRaumHo...
public void uploadFile(ActionEvent evt)throws Exception{
InputFile inputFile=(InputFile)evt.getSource();
byteArrayOutputStream=new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream=new ObjectOutputStream(byteArrayOutputStream);
objectOutputStream.writeObject(inputFile.getFile());
reportTemplate.setTemplatePa...
Is there a way to specify using JPA that there should be multiple unique constraints on different sets of columns?
@Entity
@Table(name="person",
uniqueConstraints=@UniqueConstraint(columnNames={"code", "uid"}))
public class Person {
// Unique on code and uid
public String code;
public String uid;
// Unique on us...
How do you define a field, ie email as having an index using JPA annotations. We need a non-unique key on email because there are literally millions of queries on this field per day, and its a bit slow without the key.
@Entity
@Table(name="person",
uniqueConstraints=@UniqueConstraint(columnNames={"code", "uid"}))
public class Pe...