Questions tagged [embeddable]

@Embeddable is an annotation used in Java to suggest that a class is stored as an intrinsic part of an owning entity and share the identity of the entity. It is a part of JPA implementations.

@Embeddable is an annotation used in to suggest that a class is stored as an intrinsic part of an owning entity and share the identity of the entity. It is a part of implementations/frameworks such as . This annotation will suggest to the framework that the class is a part of another entity and will treat any mapped attribute within the class as a mapped attribute of the containing entity.

It corresponds to other annotations which may be used by the owning Entity such as @Embedded and @Entity.

Java EE Documentation

SO question covering the basics of Embeddable

141 questions
6
votes
1 answer

How to build embeddable Python

I am wondering how to build embeddable Python for Windows. Could not find any info or build configuration for that particular package. Reason I ask is that I could use the same variant for Mac and Linux.
abergmeier
  • 13,224
  • 13
  • 64
  • 120
6
votes
1 answer

JPA Criteria and Predicate on a EmbeddedId

I have a little trouble. I am using JPA Criteria to make a dynamic select (using criteria as the the where clause has optional variable...) but one of my entity has a EmbeddedId that contains the user column of which and need to check the user…
Johny19
  • 5,364
  • 14
  • 61
  • 99
6
votes
1 answer

Hibernate swap out embeddable class for migrating existing data

I'm at a loss here, and perhaps it's something obvious because my Hibernate expertise is weaker than other areas. In legacy code there is a Hibernate @Entity class Foo. One of the its properties is this: private OldBar bar = new OldBar(); OldBar is…
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
5
votes
2 answers

Embeddable abstract class with JPA (+Hibernate)

I am trying to implement this JPA model: Class Owner is an Entity. It has @Embedded instance of class AbstractParent. Class AbstractParent is @Embeddable. It is an abstract class, and this class has two children.The children are concrete…
Kosta
  • 81
  • 1
  • 4
5
votes
1 answer

Create an embeddable widget using React

I have a small form component built using React that I want to make into an embeddable widget for use on other pages. I believe I heard Babelify can help accomplish this, but I'm honestly drawing a blank on how to get this working. I used Babelify…
demluckycharms
  • 421
  • 1
  • 6
  • 17
5
votes
1 answer

Using hibernate Sequence generator in embeddable/embedded-id

In Hibernate, does it possibile use @GeneratedValue and @SequenceGenerator with @EmbeddedId or in @Embeddable? I need of a string sequence generator for an embedded-id (or @embeddable).
Domenico
  • 101
  • 7
5
votes
0 answers

Nullable embedded value object with not nullable fields

I created an entity "Person" in Doctrine2, and I added to it an Adress entity, which is a value object (embeddable). I want to allow a Person creation, without an Address, so I tag my embedded as "nullable = true". But on the other hand, my Address…
Pete_Gore
  • 594
  • 1
  • 5
  • 20
5
votes
2 answers

Strange issue while configuring ID types for Embeddable class in EclipseLink-2.5.2

In my current implementation I have separate entity classes for each db table. I am using JPA along with eclipselink-2.5.2. This is working fine for me but at some point when data is huge, it lags. That's why I decided to start using @Embedded,…
5
votes
2 answers

How to use Doctrine Embeddables

I'm trying to use Doctrine embeddables in a Symfony 2 project. I have a class Purchase where I have a price field that is the embeddable: /** * Products * * @ORM\Table(name="purchases") * @ORM\Entity */ class Purchase { /** * *…
Aerendir
  • 6,152
  • 9
  • 55
  • 108
4
votes
3 answers

Extending Embeddable class in JPA

I have an embeddable class ABC extended from another embeddable class XYZ. ABC's object is embedded in an entity. The table corresponding to the entity contains only elements of ABC and not of XYZ. What should I do to get them also? I have heard…
Naveed S
  • 5,106
  • 4
  • 34
  • 52
4
votes
4 answers

Embeddable VM runtime for ANSI C

I'm looking for a Virtual Machine runtime environment that is embeddable in any ANSI C code. I have designed a syntax for a functional language that looks a lot like a stripped version of CoffeeScript. Now I want to write a compiler for this…
Fredrik Andersson
  • 3,567
  • 3
  • 19
  • 21
4
votes
1 answer

Does the JBoss embeddable/modular server still exists?

While following along some examples about EJB 3.0 given in the book "Java Persistence with Hibernate" from 2007 I was told to Go to http://jboss.com/products/ejb3, download the modular embeddable server But all I can see there, is a plugin called…
simou
  • 2,467
  • 4
  • 30
  • 39
4
votes
1 answer

@Embeddable with @ManyToOne

Imagine following classes @Embeddable class A { @ManyToOne public B classB; ... public State someEnum; } @Entity @Table(name = "TEST") class B { public long id; //... some data @Embedded @AttributeOverrides({ …
Pwnstar
  • 2,333
  • 2
  • 29
  • 52
4
votes
1 answer

Use CriteriaBuilder on embedded object

I am trying to use @Embeddable with CriteriaBuilder to filter results of a parent Entity based on the embedded property. I use Eclipse Link to generate the Metadata classes. Here is the embedded class/entity: @Embeddable public class Stamp…
Gadi
  • 1,539
  • 22
  • 37
4
votes
1 answer

Hibernate in emeddable websphere container does not find java:comp/websphere/ExtendedJTATransaction

I have a Java EE application which uses Hibernate 4.2.7 as persistence provider executing Junit tests in an embeddable Websphere 8.0.0 container. Database access works fine in a real (i.e. non-embedded) Websphere 8.0.0 instance. The unit tests do…
ferdystschenko
  • 1,527
  • 1
  • 9
  • 18
1
2
3
9 10