embed 1 « Map « JPA Q&A





1. Can Seam 2.0.2sp1 apps run on Tomcat 5.5.9 with JBoss Embedded?    stackoverflow.com

I'm trying to run the Tomcat with JBoss Embedded jpa booking example. I run the build and deploy the war. I then get the following error:

ERROR [catalina.core.ContainerBase.[Catalina].[localhost].[/jboss-seam-jpa]] Error configuring ...

2. JPA Multiple Embedded fields    stackoverflow.com

Is it possible for a JPA entity class to contain two embedded (@Embedded) fields? An example would be:

@Entity
public class Person {
    @Embedded
    public Address home;

 ...

3. Hibernate and JPA - Error Mapping Embedded class exposed through an interface    stackoverflow.com

We have a set of interfaces, used as an API, and referenced from other modules. A set of concrete implementations of those interfaces, private to the "main" app module. These classes carry ...

4. JPA/Hibernate - Embedding an Attribute    stackoverflow.com

I am having a trouble mapping an embedded attribute of a class. I have created some classes that are similar to what I am trying to do to illustrate. ...

5. Can I make an embedded Hibernate entity non-nullable?    stackoverflow.com

What I want:

@Embedded(nullable = false)
private Direito direito;
However, as you know there's no such attribute to @Embeddable. Is there a correct way to do this? I don't want workarounds.

6. something funny with embedded hsql    stackoverflow.com

Hello good people i'm just curious about something.I'm using hsql in myproject (embedded of course).At some time i felt the need to visualize what hibernate was generating.I took a free copy of ...

7. Workarounds for unresolved hibernate bug when embedded collections contain collections?    stackoverflow.com

When using hibernate, I get a ConcurrentModificationException when I have an entity A that contains an embedded collection of B, where each element of B contains a collection of Strings. ...

8. JPA/Hibernate, @Embedded and Enum    stackoverflow.com

I'm trying to persist an Enum as an Embedded value (ideally using it's String representation, but even ordinal would be ok right now) The Enum:

@Embeddable
public enum DayOfTheWeek {
 SUNDAY, MONDAY, TUESDAY, WEDNESDAY, ...

9. How do I embed a String Array into an Entity (JPA)    stackoverflow.com

I wanna design an Entity Class which has a String[] property. This String Array always has two values and I dont want Hibernate (or rather JPA) create an extra table for ...





10. jpa embedded class need cachable?    stackoverflow.com

my entity class is annotated with @Cache, my primary keys are combined of few table fields, primary keys are embedded into this class as embedded class. Do I need to put ...

11. How to query by embedded example containing null values using hibernate?    stackoverflow.com

I have a problem with a query using hibernate. The entity class EntityClass has an embedded property embedded of type EmbeddedClass and this property has a nullable property optional. When all ...

12. Lightest Database to be packed with an application    stackoverflow.com

I am developing a Java Desktop Application and want a light database that can be used with Hibernate and that can be packed with an application. I was going to use Derby ...

13. JPA/Hibernate Embedded id    stackoverflow.com

I would like to do something like that:

  • An object ReportingFile that can be a LogRequest or a LogReport file. ( both got the same structure)
  • An object Reporting containing for one logRequest, ...

14. Java - JPA - @Basic and @Embedded    stackoverflow.com

I am learning JPA from this tutorial. I have some confusions in understanding the following annotations:

  • @Basic
  • @Embedded
Fields of an embeddable type default to persistent, as if annotated with @Embedded.
If ...

15. In JPA, a Map of embeddable values, that have an embedded entity used as the key    stackoverflow.com

I'm still new to JPA (and Hibernate, which I'm using as my provider), so maybe this just can't be done, but anyway... Consider the following code:

@Entity
class Root {
    @Id
 ...

16. EJB 3.1 Embedded API - Unit test EJB + JPA entities    stackoverflow.com

Has anyone done this or attempted to do this for a preexisting project?
It seems there are two options to go with here, either using the embedded EJB API basically ...





17. Hibernate does not allow an embedded object with an int field to be null?    stackoverflow.com

Hibernate does not allow me to persist an object that contains an null embedded object with an integer field. For example, if I have a class called Thing that looks ...

18. How to declare different non-JPA annotations on embedded classes    stackoverflow.com

@Embedded
public class EmbedMe {
    private String prop1;
    private String prop2;
}

@Entity
public class EncryptedEmbedded {
    @Embeddable
    private EmbedMe enc;
}
I am current ...

19. cannot resolve property when criteria refers to a embedded property    stackoverflow.com

I seem to be unable to create a query with a criterion which refers to a property inside a Embedded class. When i use "entity.embedded.property" it fails. If i create an ...

20. Why my data does not get persisted?    stackoverflow.com

I am using JPA and Java Embedded DB in my application. I try to write some data to the database and when i try to read it back I am able ...

21. Embedding Generic Types in JPA    stackoverflow.com

Does JPA support embedding a class attribute whose type is a parameterized generic or java.lang.Object? For example:

public class Foo<T>;
{
   private T      param1;
  ...

22. DB Connection with MySQL via Hibernate on Embedded Glassfish    stackoverflow.com

I have a problem to connect my MySQL Database via Hibernate/ JPA2 on a Embedded Glassfish. My Environment:

  • Maven 2
  • Embedded Glassfish (integrated via Maven Plugin)
  • Eclipse + M2Plugin
  • Hibernate 3.5.6
  • MySQL (@localhost) (runs and can ...

23. What will be the best embedded database to be used with a small Java desktop application?    stackoverflow.com

My requirements are

  • Embedded Database
  • Easy Integration with Netbeans IDE
  • Should be able to develop using JPA
  • Free of cost
  • Size of the database should be minimum
Please do suggest me a database with the above mentioned ...

24. OpenJPA: Can the target of a ManyToOne relation be an @Embedded field?    stackoverflow.com

I am trying to use a ManyToOne relation where the foreign key links to an @Embedded field in the target class. This compiles and enhances fine, but when running this code, ...

25. JPA 1 @Embedded on accessor method returning Interface type    stackoverflow.com

I want to use @Embedded on an accessor method that returns Interface type rather than actual impl but it seems that JPA doesn't support that. Got some pointers while searching that ...

26. Hibernate Criteria API orderBy and Embedded element    stackoverflow.com

Lets say I have a Report entity. Inside it there is @Embeddable ReportPeriod which has Integer month and Integer year fields. When i try to sort my Report report by its ...

27. JPA2 samples embedded Java EE container?    stackoverflow.com

I want to create some sample code for JPA2 that can be run inside a Java EE container. Running those sample normally require to have a Java EE server but i want ...

28. JPA, Hibernate, Embedded, and OneToOne    stackoverflow.com

I'm using JPA and Hibernate, and have an @Entity which includes an @ElementCollection of an @Embeddable component, which has two @Embeddable components itself, of the same type, which have a @OneToOne ...

29. What are the challenges in embedding text search (Lucene/Solr/Hibernate Search) in applications that are hosted at client sites    stackoverflow.com

We have a enterprise java web-app that our customers (external) deploy on their intranets. I am exploring different full text search options: Lucene/Solr/Hibernate Search and one common concern is deployment/administration/tuning ...

30. Hibernate Embedded/Embeddable not null exception    stackoverflow.com

In the owning class:

...
@Embedded
private LatLon location;
...
In the referenced class:
@Embeddable
public class LatLon implements Serializable {
    private double lat;
    private double lon;
    ...
}
When I ...

31. How to setup JUnit tests for Glassfish Embeddable EJBContainer + EclipseLink JPA?    stackoverflow.com

I'm trying to use EJB 3.1 Embeddable EJBContainer on Glassfish 3.1 for integration testing my EJB's. There's a classloading issue I can't figure out. My ejbs are build into dum-ejb.jar. They use EclipseLink ...

32. Its possible insert row with embedded ID on table with HQL?    stackoverflow.com

Im able to insert any row with HQL. Example:

insert into MyMappedTable(field,field,field) select c.x, c.y, c.z from Object c where ....
But, my requirement is insert with embedded Id
@JoinColumn(insertable = false, name = "CATEGORYID", ...

33. JPA 2 XML Mapping of Embedded so that it worked with Hibernate Meta model generator    stackoverflow.com

I want to use JPA 2 Meta model generator for Hibernate (Version 1.1.1-Final) (in a Spring Application). Because I use a Mapped Superclass which is the base for all Entities, and ...

34. Hibernate embedded map saving problem    stackoverflow.com

I've been having trouble with saving embedded collections. I've come up with this crazy solution because I wanted my lazily loaded models to sort based on fields in resources. I have ...

35. Java: Hibernate and Embedded Derby; create derby on a other location/directory    stackoverflow.com

i have'nt found anything to this on Google, but i think thats something that must be possible. I got a serious Problem with my Hibernate Project: I got two Modules, one Main-Module and ...

36. Hibernate Search not indexing embedded collections properly    stackoverflow.com

I'm currently working on a project that involves the use of Hibernate Search. Currently the project uses pure SQL for its searches and we would like to use a text search ...

37. slow embedded database processing with hibernate    stackoverflow.com

I use h2 database in embedded mode, also I use hibernate to access it. That is my spring config I am using to initialize hibernate: ...

38. Hibernate Jpa Annotation: Problem with Embedded Id    stackoverflow.com

I have this schema of db: Table_A[1]-->[n]Table_C and Table_B[1]-->[n]Table_C Now, the PrimaryKey of Table_C is a EmbeddedId with Foreign key versus Table_A and Foreign Key versus Table_B. How do I note this annotation? My solution ...

39. JPA @Version with Embedded Class    stackoverflow.com

I have the below classes defined,

@Entity
@Idclass(Key.class)
public void ClassA {

...

@Id
@Version
private long version;

...
}

public class Key {
 ...
 private long version;
 ...
}
When compiling i get the below error, "Unable to define @Version on an embedded ...

40. reboot after hibernate for EWF HORM on WES7    stackoverflow.com

I'm working with WES7 (Windows Embedded Standard 7) and am utilizing the EWF (Enhanced Write Filter) and HORM (Hibernate Once Resume Many) features. I've gotten everything working nicely and read through everything ...

41. Embedded GlassFish ignores Maven test resources    stackoverflow.com

I have several session beans that I have written unit tests for. I have setup Maven to include a persistence.xml in the src/main/resources/META-INF directory that refers to a local MySQL database ...

42. Switching between embedded Databases in Java with JPA    stackoverflow.com

Im currently working my way towards JPA 2.0 and I start of liking how easy it is to maintain persistent data. What I'm currently trying to accomplish is using JPA in a ...

43. Hibernate materialize view, embedded two Entity?    stackoverflow.com

I have a question about Hibernate. I have an Entity Panier:

@ Entity
public class Panier implements Serializable
{
     @ Id @ GeneratedValue
     private long idPanier;
  ...

44. Excluding fields from @Embedded properties on case by case basis with Hibernate/JPA    stackoverflow.com

I am migrating some classes in a Hibernate hbm.xml file to JPA annotations. We have an embeddable class Address that is used in several places. Each place uses a different subset of ...

45. How to repeat embedded type in hibernate    stackoverflow.com

I have this class that I'm trying to map in Hibernate 3.6.x

@Entity @Table(name = "address") @Inheritance()
public abstract class Address {
    @Column(name = "address_type") @Enumerated(EnumType.STRING)
    private ...

46. data migration from an embedded javaDB    stackoverflow.com

I am currently working on swign based javaSE application utlizing an embedded JavaDB for storing the data. My data model (and DB ) is fully java based utilizing JPA entities and ...

47. how to embed javadb or hsqldb into java application with hibernate using netbeans?    stackoverflow.com

I successfuly embedded javadb in my application using the classpath ,but here's the problem : I want hibernate to be able to work with the database,but I always get an error ...

48. What impact does the @embedded annotation mean?    stackoverflow.com

How does the Embedded annotation affect the database? How will SQL queries need to change? What's the typical usecase for using the annotation?

49. How to use embedded model properly with play framework?    stackoverflow.com

I have an embedded model scheme. There is an Agent and the Agent has a City where the agent is located. The models are looking the following: City:

package models;

import java.util.*;
import javax.persistence.*;

import play.db.jpa.*;
import play.data.validation.*;

@Entity
public ...

50. Hibernate: Repeated column in mapping for entity | two embedded classes of the same type    stackoverflow.com

Hibernate throws an exception when creating the tables, because embedded attributes are mapped to the same column. The class Distance is embedded twice in a class route as followed:

@Embeddable
public class Distance implements ...

51. Using embedded inner class to represent complicated state in JPA    stackoverflow.com

I am trying to use an inner class as embeddable to represent some complicated properties of the outer class. When I store this, there is no information from the inner ...

52. How to create a findAllByUser query where user is a member an embedded class?    stackoverflow.com

I have the next two domain classes in a grails application:

class Room {
    String name
    RoomType roomType
    def static findAllByUser = ...

53. Not able to connect to embedded derby database in glassfish with hibernate    stackoverflow.com

Error:

Connection could not be allocated because: 
The connection was refused because the database chapter2 was not found.
Persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
   xmlns="http://java.sun.com/xml/ns/persistence"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
  ...

54. Embedded bypasses Hibernate validation but only in create    seamframework.org

/** * @author Tony Herstell * @version $Revision: 1.14 $ $Date: 2008-12-31 07:04:20 $ */ @SuppressWarnings("serial") @Entity @Name("user") @Role(name="userSearchCriteria", scope=SESSION) public class User implements Serializable { @Id @GeneratedValue private Long id; @Version @Column(name="version4OptLock") private Integer version; // Hiberante Docs: EJB3 sais Timestamp actually but recommend Integer @NotNull(message="required") @Length(max = 30) private String surname; @NotNull(message="required") @Length(max = 30) private String firstname; @NotNull(message="required") ...

55. Tomcat 6, Embedded JBoss, Hibernate (future Seam): slf4j Li...    seamframework.org

Hello,I'm new to Hibernate and especially setting up Tomcat 6 along with JBoss Embedded and Hibernate 3.5.4 (core) plus annotations and entitymanager (both 3.4.0). I put the JBoss embedded files into tomcat/lib as described here:http://community.jboss.org/wiki/Tomcat60xAfter that, I went to get my webapp to deploy, which I managed by using Ant deploy tasks and/or Tomcat's web interface (both work). Entering http://localhost:8080/bbstats gets ...

56. Hibernate Search in Action: Indexing collection objects embedded properties    coderanch.com

Greetings, Can anyone help me out with indexing collections? I have the following problem: An object CompositeItem is holding a collection named 'parts' containing instances of a Part object. The Part object is defined through an int - 'id', String - 'name', String - 'description' and a property called 'material' of type Material. The Material itself is defined through an int ...

57. SQLGrammarException using Hibernate + Embedded Derby    coderanch.com

I have a Spring application which uses an embedded Derby database for unit testing. Below is my DataSource configuration and Hibernate properties: database-->myEmbeddedConnection) and I'm trying to insert a row in that table. My configFile ...

93. Nested @Embedded from @ElementCollection ignores annotations    forum.hibernate.org

(This behavior is exhibited in 3.5.6-Final, 3.6.5.Final, and 3.6.7.Final). I'm pretty sure this is a bug, but I'm posting here first in case I've missed something. I'm using Hibernate as a JPA 2 provider with Spring 3.0.5. The idea below is that Parent contains a collection of @Embeddable objects of type A. Class A then further contains another single @Embeddable of ...

94. Hibernate Criteria can't create joins for Embedded objects    forum.hibernate.org

I believe many of you must be already knowing the usage of Embedded Class which we use to define composite primary keys in an Entity class. However, it seems Hibernate Criteria is not able to read joins if I'm using Embedded objects to refer to an Entity class. Consider the following example:-

95. Embedded ids must still be implemented.    forum.hibernate.org

Helo Guys. I'm migrating an app from Hibernate 3.6.7 to Hibernate 4.0.0.CR5, and I'm finding some problems. I'm having the following problem. Code: Caused by: org.hibernate.cfg.NotYetImplementedException: Embedded ids must still be implemented. at org.hibernate.metamodel.source.annotations.entity.ConfiguredClass.createMappedAttribute(ConfiguredClass.java:472) [hibernate-core-4.0.0.CR5.jar:] at org.hibernate.metamodel.source.annotations.entity.ConfiguredClass.collectAttributes(ConfiguredClass.java:283) [hibernate-core-4.0.0.CR5.jar:] at org.hibernate.metamodel.source.annotations.entity.ConfiguredClass.(ConfiguredClass.java:160) [hibernate-core-4.0.0.CR5.jar:] at org.hibernate.metamodel.source.annotations.entity.EntityClass.(EntityClass.java:127) [hibernate-core-4.0.0.CR5.jar:] at org.hibernate.metamodel.source.annotations.EntityHierarchyBuilder.createEntityHierarchies(EntityHierarchyBuilder.java:105) ...

96. Embedding Oracle query hints in HQL?    forum.hibernate.org

We have a rather complex HQL query we're currently running and our DBA is wondering if there is a way he can have me embed Oracle query hints into the query. FYI, you can use query hints to give the oracle query engine information about the best way to execute your query. The format is something like: {DELETE|INSERT|SELECT|UPDATE} /*+ hint [text] ...

98. Can I use QED from Quadcap for my embedded sql database?    forum.hibernate.org

Even though I have never heard of that database, it is quite probable that you can get it to work, as long as there is a JDBC driver, and the DB obeys the SQL standart at least minimally. You will most likely need to write a custom dialect, which is not that hard. Just look at the existing Dialects for examples. ...

99. Cloudscape embedded version and Hibernate 2.0.3    forum.hibernate.org

Author Message lukmanph Post subject: Cloudscape embedded version and Hibernate 2.0.3 Posted: Tue Apr 27, 2004 4:29 pm Newbie Joined: Wed Oct 22, 2003 12:59 pm Posts: 14 Hi all I have been running into a problem with Cloudscape embedded version with WASD 5.1 and I am hoping somebody could enlighten me on this issue. First of all, I ...

100. custom IdentifierGenerator, trying to embed native Generator    forum.hibernate.org

Author Message danny_mandel Post subject: custom IdentifierGenerator, trying to embed native Generator Posted: Wed Jul 14, 2004 12:21 am Newbie Joined: Tue Jul 13, 2004 9:55 pm Posts: 7 Location: Tucson, AZ Hi all. First off let me say thanks for such a kickass product! I really love using Hibernate and I don't think I can ever go back ...