entity 2 « JPA « Spring Q&A





1. Why don't entities implement Serializable?    forum.springsource.org

Generally speaking it's not a good idea to implement Serializable unless you really need it, because you are then forced to ensure the whole object graph is either serializable or transient. ...

2. java.lang.IllegalArgumentException: Object is not a known entity type.    forum.springsource.org

java.lang.IllegalArgumentException: Object is not a known entity type. Hi, I have a bundle which use JPA (EclipseLink) and expose an OSGi service. The exposed service is actually a DAO object with ...

3. java.lang.NoClassDefFoundError looking for entity in a separate project    forum.springsource.org

java.lang.NoClassDefFoundError looking for entity in a separate project I had a working Spring project JPA/Hibernate Spring project which I refactored the @Entity classes out into a separate project. At the same ...

4. export entities & DAO to another project    forum.springsource.org

Hello, I have to make a comparison and analysis of differents frameworks to redo an application. So I develop many prototypes. First I chose SpringRoo framework. I finished my Roo prototype ...

5. Entity refresh using spring data jpa module    forum.springsource.org

Just add the custom implementation method as described in [0]. In your implementation class just refer to the EntityManager via @PersistenceContext. If you think this should be inside JpaRepository, feel free ...

6. Entities not persisted with Quartz    forum.springsource.org

Jul 27th, 2011, 03:30 AM #1 mserioli View Profile View Forum Posts Private Message Member Join Date May 2010 Location Angolo Terme, BS, Italy Posts 33 Entities not persisted with Quartz ...

7. Does Spring Data JPA have any way to count entities using specifications?    forum.springsource.org

In Hades you could say myDao.count(mySpecification) but there is no such method in Spring Data JPA Repositories, only myDao.count(). Is there any other way to achieve this?

8. Listing Everything in an Entity    forum.springsource.org

Listing Everything in an Entity In my roo project I want to list all the things the user inputted. i.e. say it was a computer building program where each part is ...

9. Saving Entities in Controllers: propertyEditors/conversionService    forum.springsource.org

Saving Entities in Controllers: propertyEditors/conversionService Hi, I've always used value objects as a way to save (JPA) entities and it's a cumbersome approach. Ideally, I would like to use entities directly ...





10. JPA Entities from an external JAR: "references an unknown entity" error.    forum.springsource.org

JPA Entities from an external JAR: "references an unknown entity" error. Hello, We are trying to use an external JAR as a maven dependency containing JPA entities but we have this ...

11. Error Could not instantiate entity    forum.springsource.org

Error Could not instantiate entity I'm using DBRE and when I do clic in "List all XXX" I have the following error Code: org.hibernate.InstantiationException: Could not instantiate entity: com.clientes.Clientes; nested exception ...

12. "List All" for ALL Entities    forum.springsource.org

Is there any way for me to to have an entity or something that when clicked shows me ALL the data entered (i.e. "List all" for all entities)? I played around ...

13. Persistence of test entity works but the ID of one entity remains null, why?    forum.springsource.org

Persistence of test entity works but the ID of one entity remains null, why? Hello, I have a problem with a simple persistence test case, using Spring 3 and Spring Data ...

14. org.hibernate.MappingException: Unknown entity    forum.springsource.org

PHP Code:

15. basic question about generated entities and domain objects    forum.springsource.org

basic question about generated entities and domain objects Hi, I have got a basic question about the generated entities by Roo. If I am generating an entity with Roo then the ...

16. Query to Entity Type Casting Problem    forum.springsource.org

public Customer findCustomerByPaymentCode(String paymentCode) { Query findCustomerByPaymentCode = em .createQuery("from CateringReservation c where c.paymentCode = :paymentCode"); findCustomerByPaymentCode.setParameter("paymentCode", paymentCode); return (Customer) findCustomerByPaymentCode; }





17. Can't get multiple entities using 'select new' in a @Query on a Spring JPA repository    forum.springsource.org

Can't get multiple entities using 'select new' in a @Query on a Spring JPA repository Hibernate: 4.0.0.CR3 spring-data-jpa: 1.0.1.RELEASE spring-data-commons-core: 1.1.0.RELEASE jdk 1.6.0_20 I have a query on my repository interface ...

18. Pointcut / advice on @Entity updates to change field : private int updateUser    forum.springsource.org

Pointcut / advice on @Entity updates to change field : private int updateUser Hi, This isn't SpringAOP specifically as I'm starting to use AspectJ to work with private methods and fields, ...

19. STS not autoresolving Neo4j Entity annotations    forum.springsource.org

STS version:2.7.0.RELEASE Grails version:1.3.7 neo4jplugin:0.3.1 on installing the plugin for neo4j ( on command line) and setting up for an eclipse view in STS, the grails plugin does not autoresolve the ...

20. command database reverse ingeneer ->entities was created but nothing inside    forum.springsource.org

hi i have a problem i use command database reverse ingeneer and the result to this command its java class ans classe aspect but why my classes entities ares empty (only ...

21. best practice to save an entity using hibernate    forum.springsource.org

best practice to save an entity using hibernate Hi, I am developing an app using Spring and hibernate and have a form that updates some fields of an object. I load ...

22. Does scaffolding work for Mongo Entities in 1.2 M1 ?    forum.springsource.org

Does scaffolding work for Mongo Entities in 1.2 M1 ? I am using 1.2 M1 and running the script below: project --topLevelPackage com.foo--projectName job-console --java 6 mongo setup web mvc setup ...

23. NonUniqueObjectException: when updating an entity with hibernate    forum.springsource.org

Code: class Authority{ @ManyToMany(cascade = CascadeType.ALL) @JoinTable(name = "authority_permission", joinColumns = { @JoinColumn(name = "authority_id", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "permission_id", nullable = false, ...

24. How can I execute a query without using dummy entity member (finder not work)?    forum.springsource.org

How can I execute a query without using dummy entity member (finder not work)? Hi all, I'm trying to create a dynamic finder for an entity that referrers not to an ...

25. I can't use an @Embeddable as identifier in several Entities    forum.springsource.org

I can't use an @Embeddable as identifier in several Entities Hello: We've a domain object with a composite key. Imagine something like Location with countryCode, cityCode and postalCode and randomId (table ...

26. Use own id in auditable entity    forum.springsource.org

Hello all, I tried to use my redefined id in my entity which extends AbstractAuditable (I used Spring Data Jpa 1.0.0RELEASE & hibernate 3.5.5 ) : Code: @Entity @Table(name="DEMO_USERS") public class ...

27. Customizing Entities Generated by DBRE    forum.springsource.org

Customizing Entities Generated by DBRE I'm looking for an easy way to customize the entities that the database reverse engineering (DBRE) add-on for Spring Roo generates. If, for example, I want ...

28. Subclassed entities: java.lang.IllegalArgumentException: Unknown entity    forum.springsource.org

Nov 9th, 2011, 10:27 AM #1 Bruce.Edge View Profile View Forum Posts Private Message Member Join Date Jun 2011 Posts 31 Subclassed entities: java.lang.IllegalArgumentException: Unknown entity I have a 3 level ...

29. entity jpa command fail    forum.springsource.org

entity jpa command fail Hi all, i'm studyng Spring Roo and i'm following the official tutorial: http://static.springsource.org/sprin...beginning.html I have a problem with 'entity jpa' command: Code: roo> project --topLevelPackage test Created ...

30. All entities loaded when show method called for just one    forum.springsource.org

All entities loaded when show method called for just one Hi All, This is rather odd, when calling planets/1 to show the first planet entry things have been running incredibly slow. ...

31. Why and how to avoid selects on associated entities while updating?    forum.springsource.org

Why and how to avoid selects on associated entities while updating? Hi guys, When I use the saveAndFlush(myObject) method, I see queries that select the associated entities just before the update. ...

32. Using same or similar entities across multiple persistence units    forum.springsource.org

Using same or similar entities across multiple persistence units Hi, I'm trying to work out what the best way to re-use entities across multiple persistence units where there are tables in ...

33. Entities inclusion raises error    forum.springsource.org

In my config if I include an entities file in the DOCTYPE declaration I get an Unsupported DTD error and cant do anything more with it.

34. Resolving XML entities from the XMLBeanDefinitionReader    forum.springsource.org

Resolving XML entities from the XMLBeanDefinitionReader Hi, I'm having some problems, using some parametric entities within my bean definition files. I have the following declared at the beginning of the file: ...

35. Intercepting Method Calls to POJO Domain Entities    forum.springsource.org

Intercepting Method Calls to POJO Domain Entities Ok, here's the deal. I have a bunch of domain entity (POJO's) being persisted through Hibernate. I have an application facade making the service ...

36. Hibernate MappingException: Unknown entity    forum.springsource.org

Hibernate MappingException: Unknown entity Hi all, I've got a system with 10 working mappings. when I tried to create the latest one I get the following error when trying to load ...

37. DAO Reference Inside an Entity Domain Object?    forum.springsource.org

DAO Reference Inside an Entity Domain Object? I have an entity domain object that has a large collection of child entity domain objects. I have to implement an operation (let's call ...

38. updating persistent entities (spring newbie)    forum.springsource.org

updating persistent entities (spring newbie) I'm trying to update a persistent pojo, by first loading the object, then changing one of it's properties. The update attribute for this property in the ...

39. Hib 3 Entity Caching Strats on LocalSessionFactoryBean    forum.springsource.org

2nd level caching The caching settings for the LocalSessionFactory bean are basically the same as if you had a non-spring managed session factory The entity and collection cache strategies settings on ...

40. HTML Character Entities ignored    forum.springsource.org

In my message.properties, a few of my message texts contain special characters like &039; or —. On the browser of the running application, these are displayed just as those character strings, ...

41. form and entities    forum.springsource.org

I trying to build form in spring and velocity and have a problem with polish letters. In request i have entities () not letters. How can i have normal string in ...

42. suggestions for porting SLSB->entity arch to spring->hibernate arch    forum.springsource.org

suggestions for porting SLSB->entity arch to spring->hibernate arch Currently we have an arch for an enterprise app like so A Delegate function-->calls -->Session Facade function -->calls Data logic service function -->calls ...

43. aop proxies as hibernate entities?    forum.springsource.org

Feb 8th, 2006, 04:32 PM #1 fxjr View Profile View Forum Posts Private Message Junior Member Join Date Nov 2005 Location Brasilia, Brazil Posts 29 aop proxies as hibernate entities? Hi ...

44. Unable to load entity    forum.springsource.org

HI All, I am trying to read a row from database using spring-hibernate. I use the following code: getHibernateTemplete().get() method to load but this give me an error. Unable to load ...

45. An problem encount when I use Hibernate entity manager    forum.springsource.org

An problem encount when I use Hibernate entity manager I use spring 2.0M2 and hibernate entitymanager my persistence.xml file Code: org.hibernate.ejb.HibernatePersistence com.jl.sub1.Product com.jl.sub1.ProductItem ...

46. Velocity HTML Entity Replacement    forum.springsource.org

StringWriter sw = new StringWriter(); HashMap args = new HashMap(); args.put("randomText", "abc\"+"); VelocityEngineUtils.mergeTemplate(velocityEngine, "ResetPasswordRequest.vm", args, sw); System.out.println(sw.toString());

47. related entities from drop down list on a form    forum.springsource.org

related entities from drop down list on a form I have following entity relations child->parent (M to 1) (Hibernate ORM) On the child web form (jsp) there is a drop down ...

48. Hibernate Design Choice: Entity or Value?    forum.springsource.org

Reference Data in Hibernate: Value or Entity? I have Hibernate mapping situation with two alternative solutions and wanted your opinions on which is best. The domain layer developer here always makes ...

49. org.hibernate.MappingException: entity class not found    forum.springsource.org

Jul 17th, 2006, 07:21 AM #1 shobhitha View Profile View Forum Posts Private Message Junior Member Join Date Jun 2006 Posts 8 org.hibernate.MappingException: entity class not found Hi, When I run ...

50. Unknown entity when using Hibernate in AbstractDependencyInjectionSpringContextTests    forum.springsource.org

Aug 24th, 2006, 04:30 AM #1 Paul Newport View Profile View Forum Posts Private Message Senior Member Join Date Sep 2004 Posts 586 Unknown entity when using Hibernate in AbstractDependencyInjectionSpringContextTests The ...

51. Hibernate, problem with entity mapping    forum.springsource.org

Hibernate, problem with entity mapping Hi I found strange problem. If I try use Hibernate, in class that is derived from SimpleFormController, this exception is thrown: org.hibernate.MappingException: Unknown entity: net.pattern26.album.User$$EnhancerByCGLIB$$d348eea 7 ...

52. JPA Refresh Entity not working    forum.springsource.org

the refresh method of getJpaTemplate throws a IllegalArgumentException: can not refresh not managed object: null. Even though the object itself is an instance of the find of the JpaDaoSupport

53. Howto get all entity classes in JPA?    forum.springsource.org

Maybe this is the wrong forum for this question because maybe it's a "pure" jpa question but since I work in a Spring(2.0 final)-context... For reasons that you are most uninterested ...

54. SelectedValueComparator and Entity equals()    forum.springsource.org

SelectedValueComparator and Entity equals() Hi, I want to use new select tag Everything is okey, but as i dont override equals() method, my ...

55. @Entity with multiple classpaths    forum.springsource.org

What classpaths are searched when locating @Entity classes? Is it the entire classpath, or just the jar/directory that contains the persistence.xml file? I'm seeing a situation where I have @Entity classes ...

56. how to disable HTML entity encoding    forum.springsource.org

how to disable HTML entity encoding Greetings! What's the proper way to 'disable' HTML entity encoding? I have a form with with textarea and I need to preserve the line breaks ...

57. Managed Entity Problem    forum.springsource.org

Managed Entity Problem Hey, I used JPA with Spring2. I used jpaTemplate to persist,update and delet the objects.i set the transaction as an aspect around the CRUD methods.(Using TransactionProxyFactoryBean). Every thing ...

58. Hibernate 3, Unknown entity    forum.springsource.org

Hibernate 3, Unknown entity Hi all, after trying a lot of hours without any result I hope that someone here is able to help. I would just like to make a ...

59. Acccessing JPA Entity Manager from JUnit    forum.springsource.org

Acccessing JPA Entity Manager from JUnit We've been using Spring/JPA/Hibernate for a number of months now and have built up quite a suite of tests. We have been testing our Service ...

60. Spring JPA: Unknown entity error    forum.springsource.org

Spring JPA: Unknown entity error Hi all, I'm using Spring JPA (Implementing DAOs based on plain JPA). I'm working on a system which i organize it into different projects in Eclipse ...

61. Unable to deploy war file containing spring+hibernate+entity manager    forum.springsource.org

Unable to deploy war file containing spring+hibernate+entity manager Hi, I have a war that uses spring 2.0-rc3, hibernate 3.2, hibernate-annotations-3.2.1.GA and hibernate-entitymanager-3.2.1.GA components. I have defined the entityManagerFactory, persistence.xml etc using ...

62. JPA: Entity must be managed to call remove    forum.springsource.org

Jan 31st, 2007, 05:51 AM #1 alpheratz View Profile View Forum Posts Private Message Senior Member Join Date Mar 2006 Posts 119 JPA: Entity must be managed to call remove Hi, ...

63. error with JPA & hibernate entity manager    forum.springsource.org

Mar 5th, 2007, 04:16 PM #1 cchenhhong View Profile View Forum Posts Private Message Junior Member Join Date Mar 2007 Posts 1 error with JPA & hibernate entity manager I am ...

64. PersistentObjectException: detached entity passed to persist    forum.springsource.org

PersistentObjectException: detached entity passed to persist While trying to create my generic DAO I've bumped into the following problem while using Spring's JpaTemplate. I've written a test that creates an entity, ...

65. Complex entity attributes mapping    forum.springsource.org

Complex entity attributes mapping Hello all, Problems with complex attributes mapping. Please help if have any ideas of good implementation. Seems to be trivial task, but can't find a good way. ...

66. Spring+JPA+Hibernate, problem persisting entities    forum.springsource.org

Mar 28th, 2007, 06:43 AM #1 faisal abdul aziz View Profile View Forum Posts Private Message Member Join Date May 2006 Posts 35 Spring+JPA+Hibernate, problem persisting entities Hi guys, I am ...

67. What tier to aggregate data from multiple entities?    forum.springsource.org

What tier to aggregate data from multiple entities? I have a general question about what tier in an application to create and populate a class that is used to aide GUI ...

68. Why doesn't hibernate update the identifier of my entities?    forum.springsource.org

Hello! I don't understand this behaviour: Code: Parent parent = getParentById(x); Childs childs = parent.getChilds(); LOG.debug("# of Childs: " + childs.size()); Child newChild = new Child(); newChild.setParent(parent); childs.add(newChild); myDAO.update(parent); LOG.debug("ChildId via ...

69. Retrieve results via JPA when not selecting an Entity    forum.springsource.org

Retrieve results via JPA when not selecting an Entity This question might have a very simple answer, but I've not been able to find it so far. And as the saying ...

70. Getting Error : Unknown entity    forum.springsource.org

May 14th, 2007, 06:22 AM #1 pbrreddy View Profile View Forum Posts Private Message Junior Member Join Date Apr 2007 Posts 8 Getting Error : Unknown entity Hi All, Iam getting ...

71. unknown entity with JPA    forum.springsource.org

unknown entity with JPA Hi I am unable to run a successful integration test either from Maven or from Eclipse even though my application works fine at runtime! Here is my ...

72. entity and value objets (ddm)    forum.springsource.org

entity and value objets (ddm) Hi, im trying to implement a domain driven model and i am having problems identifying "entity and value objects",i don't understand very well the concept of ...

73. Stateful Entities in Ctx    forum.springsource.org

Hello, Is it normal/good practice to describe entities in the app ctx, which implement some interface containing its accessor methods in order to allow the entity implementation to be swapped out ...

74. Bug in Hibernate Template: Persisting an entity    forum.springsource.org

75. Use Hibernate Entities in the web layer?    forum.springsource.org

Hello, I wonder how to handle my entities in a complete Spring application (persistence, logic, web layer). I have Hibernate generating entities and corresponding mapping files for me. Now the web ...

76. Unknown Entity Exception while using Implementation    forum.springsource.org

Unknown Entity Exception while using Implementation Hi All, I'm pretty much new to Springs. I'm running into an issue when i'm using springs with hibernate. I'm Not sure whether this post ...

77. JPA - Serialize entity with lazy loading    forum.springsource.org

I love to know if there is a nice solution to this. This was one of the reasons I've seen people eagerly initializing everything or using DTOs in the past. I ...

78. "promote" entity from one database to another    forum.springsource.org

"promote" entity from one database to another Folks, I have a situation where I need to provide "promote" functionality where Vendor data from pre-production database is copied to production database. I ...

79. Spring and OFBiz Entity Engine    forum.springsource.org

Does anyone have experience using the Apache OFBiz Entity Engine? Is it comparable to or better/worse than Hibernate? Has anyone used it with Spring? I've seen it is used by the ...

80. Maven: jpa entities in more than one jar    forum.springsource.org

Maven: jpa entities in more than one jar Our app is broken up into maven projects by functionality. Entity classes (annotated with @Entity) appear in multiple projects/jars. We want only one ...

81. URI was not reported to parser for entity    forum.springsource.org

URI was not reported to parser for entity suddenly i'm getting this errors on server load , using tomcat+hibernta 3.1+spring+log4j i can't seem to understnad what happened .. nor do i ...

82. Cache Region or "group" for entities    forum.springsource.org

Cache Region or "group" for entities Hi all, I would like to know if it's possible to create a cache "region" or a "group" of entities while using Hibernate/ehCache. I know ...

83. Problem: Object is not a known entity type    forum.springsource.org

Aug 27th, 2007, 08:16 AM #1 olmaygti View Profile View Forum Posts Private Message Visit Homepage Junior Member Join Date Aug 2007 Location Legans (Madrid) Posts 3 Problem: Object is not ...

84. Sharing hibernate entities between threads    forum.springsource.org

Sharing hibernate entities between threads Hello, I have the following problem. I have a service which at a point determines if a query must be run background or not. If it ...

85. org.hibernate.MappingException: Unknown entity    forum.springsource.org

org.hibernate.MappingException: Unknown entity Hi, I am using a GenericDao like: public interface GenericDao { PK create(T newInstance); T read(PK id); void update(T transientObject); void delete(T persistentObject); } Then ...

86. Does Spring support smth. like entity-editor?    forum.springsource.org

Does Spring support smth. like entity-editor? Hi! I have one question. For example I want to write page where I will have a form for UserData (e.g). And I have user ...

87. Merging of detached entities    forum.springsource.org

Merging of detached entities Hello, When designing a bigger application, how are you managing detached entities? Using Spring+JPA (Hibernate backend) The two specific quesions I have: 1. Let's say i've got ...

88. Hibernate too eager on saving Spring bound entity    forum.springsource.org

Hibernate too eager on saving Spring bound entity Hi all I've got the problem, that Hibernate recognizes changes to my Spring bound object and saves, even if my form post was ...

89. How to add a hibernate interceptor to entity manager    forum.springsource.org

How to add a hibernate interceptor to entity manager Hi My entityManagerFactory looks like:

90. org.springframework.orm.hibernate3.HibernateSystem Exception: Unknown entity    forum.springsource.org

org.springframework.orm.hibernate3.HibernateSystem Exception: Unknown entity Hi All, I have just started using Spring, and Hibernate. So please forgive me if I missed anything obviuos. I have seen plenty of threads around this ...

91. JPA annotated entities in jar files    forum.springsource.org

I am using JPA with Springs LocalContainerEntityManagerFactoryBean and Hibernate. I have the problem that some of my @Entity annotated classes are in jar files imported by my application and are therefore ...

92. Hibernate : One to Many Relation , Pagination when fetching associated entities    forum.springsource.org

Hibernate : One to Many Relation , Pagination when fetching associated entities I have two classes A and B both are participating in one-to-many relationship Class A { .....attributes; //Signifies One ...

93. HibernateSystemException: Unknown entity    forum.springsource.org

HibernateSystemException: Unknown entity Hi, Following is my hibernate configuration in applicationContext.xml file ---------------------------------------------------- ...

94. Entity manager factory init error    forum.springsource.org

Entity manager factory init error I am trying to unit test my JPA/Hibernate component. So, I created a little test suite and changed my application context file to use LocalEntityManagerFactoryBean like ...

95. Hibernate merge issue for an entity having an proprty of type enum    forum.springsource.org

Hibernate merge issue for an entity having an proprty of type enum Hi all, I am facing an issue with merge for spring-2.0.7. I am having an entity something like class ...

96. Hibernate and entity-name    forum.springsource.org

Hibernate and entity-name Hello I was wondering that, is there a anyway to map mapping to using entity-name mapping? Or does somebody knows that, how can i mapping this ...

97. Evicting a subelement of an entity object    forum.springsource.org

Evicting a subelement of an entity object While using transactions I have come across the following problem: "A different object with the same identifier value was allready associated with the session". ...

98. JpaTemplate udates the entity id    forum.springsource.org

JpaTemplate udates the entity id Hi, I am using JpaTemplate to update an entity but it also tries to update the id of the entity and hence the update fails. I ...

99. How to force insert a entity to the database? (batch/cache problems)    forum.springsource.org

How to force insert a entity to the database? (batch/cache problems) Hello, I would like to know what does it take to get an entity to my database. This is my ...

100. PersistenceUnit not Found -Spring+JPA+Hibernate Entity manager 3.3.1    forum.springsource.org

Mar 14th, 2008, 02:15 PM #1 saikiran View Profile View Forum Posts Private Message Member Join Date Jun 2007 Posts 58 PersistenceUnit not Found -Spring+JPA+Hibernate Entity manager 3.3.1 hi, I am ...