1. JPA: @ElementCollection and InheritanceType.TABLE_PER_CLASS -> Duplicate column name stackoverflow.comI've created the following scenario:
|
2. JPA 2 -- Using @ElementCollection in CriteriaQuery stackoverflow.com
|
3. Hibernate - @ElementCollection - Strange delete/insert behavior stackoverflow.com
|
4. Using @ElementCollection in CriteriaQuery stackoverflow.com
Given the following structure, I'd like ... |
5. Specify foreign key constraint name when using Map and @ElementCollection with Hibernate stackoverflow.comI have a sort of exotic mapping for a field:
SchoolYear is an ... |
6. jpa Hibernate @ElementCollection stackoverflow.comI have a question which bothers me a bit. When i use @ElementCollection in my entity hibernate (3.5) generates me a table without any constraints. Important Edit My Entity is a subclass ... |
7. Hibernate @ElementCollection - Better solution needed stackoverflow.comI'm using Hibernate 3.5.a-Final as ORM-Layer in a web application. I've got several Beans with the same code-sniplet wich makes me think that this design isn't the best one around. But ... |
8. JPA: @ElementCollection with SortedMap |
9. Hibernate ClassCastException when performing merge/ update of class that uses @ElementCollection with Enums stackoverflow.comI have a class that gives the exception below when saving. This is puzzling because I can retrieve the data fine. The error still occurs even if I perform a merge ... |
10. Hibernate unsaved instance exception using @ElementCollection stackoverflow.comI am getting an exception object references an unsaved transient instance - save the transient instance before flushingthrown in the following code:
|
11. jpa criteriabuilder for @ElementCollection stackoverflow.comWhat's the equivalent CriteriaBuilder for this simple jpl?
|
12. How to make a like query to @ElementCollection of type map? stackoverflow.comI have a class like this:
I'd like to find out which MyEntity entities have a property value that matches ... |
13. How to perform subquery on an @ElementCollection within the same entity? stackoverflow.comConsider the following entity.
|
14. Does JPA @ElementCollection annotation always produce an one-to-many relationship? stackoverflow.comFor this question, consider the following sample:
|
15. Hql "in" statement doesn't work with an @ElementCollection stackoverflow.com
|
16. @ElementCollection: bad column names forum.hibernate.orgAlas no. In order to move on, I simply used @AttributeOverrides to explicit define the name and design of each column. If you build your own database schema, you only have to define the name of the columns. Obvious, this isn't ideal, nor reusable. But, for my immediate needs it suffices. Best of Luck. |
17. Hibernate issue with @ElementCollection and @MapKeyColumn forum.hibernate.orgHi, all. I'm getting 4 items in result of Code: criteria.list() instead of expected one. Has anyone faced the same issue? Looks like Hibernate issue. If FetchType is set to LAZY of @ElementCollection fetch strategy it works as expected. I'm getting as many items as items in extraProperties. Sample code is provided. Code: @Entity @Table(name = "source") public class Source implements ... |
18. @ElementCollection has to use JOIN in Hbernate forum.hibernate.orgagoncal Post subject: Re: @ElementCollection has to use JOIN in Hbernate Posted: Tue Nov 02, 2010 5:55 am Newbie Joined: Sun Aug 06, 2006 8:54 am Posts: 15 Here is what I get (with log level at debug) : Code: 10:53:14,512 DEBUG QueryTranslatorImpl:272 - parse() - HQL: SELECT b FROM org.beginningee6.tutorial.Book b WHERE 'scifi' member of b.tags 10:53:14,527 DEBUG ... |
19. Maintain LinkedHashMap insertion order on @ElementCollection forum.hibernate.org Users u = new Users(); u.setUsername("foo"); Map |
20. @ElementCollection @MapKeyColumn: can't update 'null' value forum.hibernate.org//no hibernate specific annotations used import javax.persistence.* @Entity(name = "MYENTITY") @SecondaryTables(value = @SecondaryTable(name = "MYENTITY_L10N", pkJoinColumns = @PrimaryKeyJoinColumn(name = "PK_MYENTITY"))) public class MyEntity { @Id @Column(name = "PK") private int pk; @ElementCollection(fetch = FetchType.EAGER) @MapKeyColumn(name = "LANGISO", table = "MYENTITY_L10N") ... |
21. Assertion Fails with @ElementCollection forum.hibernate.org@Embeddable public class Quote implements Serializable { /** * */ private static final long serialVersionUID = -1354843737714041018L; @Column(name = "quotePrice", precision = 10, scale = 2) BigDecimal price = BigDecimal.ZERO; @Column(name = "quoteSize") int size ... |
22. Wrong PK for @ElementCollection forum.hibernate.orgHi all, I have a wrong definition of the primary key for the table used to store the embedded components of an entity. Hibernate: 3.5.1-Final Code is: Code: @Entity(name = "A") @org.hibernate.annotations.Entity(dynamicUpdate = true, optimisticLock = OptimisticLockType.VERSION) @Table(name = "A") public class ABean { ... @ElementCollection(fetch = FetchType.EAGER, targetClass = AComponent.class) @JoinTable(name = "B", joinColumns = @JoinColumn(name = "aid", nullable = ... |
23. @ElementCollection Repeated column in mapping for collection forum.hibernate.org... not important Spring's complains ... Caused by: javax.persistence.PersistenceException: [PersistenceUnit: phibase.schema] Unable to build EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:911) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 47 more Caused by: org.hibernate.MappingException: Repeated column in mapping for collection: org.phibase.database.schema.ReferenceGeneProduct.joinedReferenceGene column: referenceGeneProductID at org.hibernate.mapping.Collection.checkColumnDuplication(Collection.java:341) at org.hibernate.mapping.Collection.checkColumnDuplication(Collection.java:364) at org.hibernate.mapping.Collection.validate(Collection.java:321) at org.hibernate.mapping.Set.validate(Set.java:42) at org.hibernate.cfg.Configuration.validate(Configuration.java:1336) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1835) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:902) ... 52 more |
24. @ElementCollection + Enumerated forum.hibernate.orgI'm using ElementCollection annotation, but i can't make it work, looks like hibernate is not processing it. My code @Entity(name = "user") public class User implements Serializable { private static final long serialVersionUID = 5791136125077815304L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; private String username; private String password; private String mail; private Date createdOn; @ElementCollection @Column(name = "authority") @CollectionTable(name = "user_authority", ... |