key 2 « JPA « Spring Q&A





1. Java 5 enum values as Map entry keys    forum.springsource.org

Java 5 enum values as Map entry keys Hi, I'm working with Spring 1.2, and want to configure a Map bean property as follows: MY_ENUM_VALUE ...

2. Can we apply interpolation of keys in messageResources?    forum.springsource.org

hi,all I want reuse some of the keys defined in the messageResources,say ##MessageResource.properties father=Daddy father.name=The Full name of Daddy You see, 'Daddy' is written twice. Can I use something which references ...

3. how to specify default i18n messages in case an entry for the key is not found    forum.springsource.org

how to specify default i18n messages in case an entry for the key is not found I have configured a messageSource bean (org.springframework.context.support.ResourceBundl eMessageSource) in dispatcher-servlet.xml with the basename property. While ...

4. Hibernate unique-key accross class attribute    forum.springsource.org

Nov 17th, 2006, 09:08 AM #1 iksrazal View Profile View Forum Posts Private Message Member Join Date May 2005 Location Fortaleza, brazil Posts 67 Hibernate unique-key accross class attribute Hi all, ...

5. IBatis key increment    forum.springsource.org

Hello, Hopefully just a quick one. I am using SqlMapClientDaoSupport to perform inserts . My primary key (MySQL) auto increments upon insert. Is there any helper available through this class I ...

6. Canonical way to retrieve generated keys with JDBC?    forum.springsource.org

Canonical way to retrieve generated keys with JDBC? Hello all I'm new to Spring. I'm trying to use JdbcTemplate, DriverManagerDataSource and friends to do some experiments with JDBC. Following these tutorials: ...

7. Referencing to map key in HQL, is it possible?    forum.springsource.org

Hi, I have object called Article which holds java.util.map property. Map property is mapped like this: Code: ...

8. Defining a Map with constants as key values    forum.springsource.org

Defining a Map with constants as key values Hi, Is it possible to define a Map in the bean factory where I use a constants as key values instead? As an ...

9. Unique key violation w/ Hibernate    forum.springsource.org

Good afternoon gentlemen, In the case that a unique key violation is thrown by Hibernate is there a way to get to the table / column that the violation was triggered ...





10. Load data with composite keys    forum.springsource.org

I have a composite primary key mapping using the following tag : Q1. I want to know, how will be the POJO for this ...

11. accesssing model object with dynamic keys    forum.springsource.org

accesssing model object with dynamic keys Hi there, I have very simple problem however I didn't found any solutions since hours. I have a simple controller adding a set of model ...

12. Can Map's Entry key be other than String?    forum.springsource.org

Hi there, I know bean config has built in map an properties, but is there way I can change the key inside the map's entry other than just a String type? ...

13. Duplicate entry '6979585' for key 4    forum.springsource.org

Duplicate entry '6979585' for key 4 Hi...i'm back again (not sure if thats good or not!) I am getting the following error and was wondering if anyone could help. The error ...

14. qestion about JPA/Hibernate primary key auto generation    forum.springsource.org

Feb 5th, 2007, 04:57 PM #1 L ZHANG View Profile View Forum Posts Private Message Junior Member Join Date Feb 2007 Posts 12 qestion about JPA/Hibernate primary key auto generation I've ...

15. What do thease "key"s mean?    forum.springsource.org

Code: ... ... ... I don't quite understand what ...

16. Composite key using Hibernate Annotations    forum.springsource.org

Hi All, I Am also trying to know , how to do mapping in hbm for a composite key. I have two tables.From Table A we are using two columns as ...





17. ava.lang.IllegalStateException: No value for key [org.hibernate.impl.SessionFactoryIm    forum.springsource.org

Mar 5th, 2007, 12:44 AM #1 manoj.munde@wipro.com View Profile View Forum Posts Private Message Junior Member Join Date Mar 2007 Posts 3 ava.lang.IllegalStateException: No value for key [org.hibernate.impl.SessionFactoryIm Posted: Thu Mar ...

18. a beanFactoryReference already exists for key jbpmConfiguration    forum.springsource.org

a beanFactoryReference already exists for key jbpmConfiguration I see a few people are having this problem, but it is not pointing me in any direction. I have set up Jbpm per ...

19. a beanFactoryReference already exists for key jbpmConfiguration    forum.springsource.org

a beanFactoryReference already exists for key jbpmConfiguration Hi, I'm new on this forum and I have a big problem to solve (ASAP). This is a problem I often see in this ...

20. Foreign key and autoinc    forum.springsource.org

Mar 13th, 2007, 04:05 PM #1 Dosihris View Profile View Forum Posts Private Message Senior Member Join Date Dec 2006 Posts 150 Foreign key and autoinc Hi, i have an interesting ...

21. Some message keys not are not visible to springframework classes.    forum.springsource.org

Some message keys not are not visible to springframework classes. Hi all, I have an English ResourceBundle with 219 entries in it. My problem is that not all the entries can ...

22. Bidirectional association, foreign key null    forum.springsource.org

Bidirectional association, foreign key null Hi, I have a problem that probably has a simple solution but I just can't find it. I have two classes with one-to-many bidirectional association. Inserting ...

23. 2 datasources and foreign key    forum.springsource.org

2 datasources and foreign key our application is going to need hibernate accessing 2 data repositories. from what i have read, this should not be terrible to configure/code. it has come ...

24. No image with key 'applicationInfo.image'... the second    forum.springsource.org

No image with key 'applicationInfo.image'... the second Dear List I am a new user to spring-richclient, so the solution for problem might be obvious for u, but drives me crazy. I ...

25. foreign key constarint mapping    forum.springsource.org

foreign key constarint mapping hi i have three tables table a, table b , table c table b has foreign key constarint(name=foo column=fReqId) mapping to table a primary key(column=id) table c ...

26. primary key problem    forum.springsource.org

primary key problem Hi I've table with id, appid and some more columns ID here is this table ID which increments by default. whereas appid is the one whoch has one-tomany ...

27. Foreign Key not being populated    forum.springsource.org

Foreign Key not being populated Data Model: ----SOLDIER---- soldierId pk -----ADDRESS----- addressId pk soldierId fk A soldier can have one-to-many addresses. I'm trying to insert a soldier that has a collection ...

28. primary keys, hashCode & equals, and UUIDs    forum.springsource.org

primary keys, hashCode & equals, and UUIDs I'm really attracted to the idea of generating my primary keys outside of the database, before I insert the data into the database, using ...

29. The best way to put constants key/value pair?    forum.springsource.org

Can someone please help me to show an example on how to put and use constants (key/value pairs) in Spring. Where to put it, in context? I want to use them ...

30. key points before going through the Spring and J2EE    forum.springsource.org

Here is a start: http://java.sun.com/developer/techni...2EE/intro_ee5/ I suppose that is a bit like studying it, but it is impossible to wrap up Enterprise Java in a forum. Steve O

31. Using static member vars as key values - How?    forum.springsource.org

Look at the stuff in the Spring 2.0 docs. I think it might help. http://www.springframework.org/docs/reference/xsd-config.html Basically you would refer to the static variables like: Make sure the ...

32. Problem with generated key in MSSQL    forum.springsource.org

Problem with generated key in MSSQL I have table with integer primary key. That key is autoincrementing. That code runs fine: SqlUpdate su = new SqlUpdate(getDataSource(), NEW_RUN); su.declareParameter(new SqlParameter(Types.VARCHAR)); ... su.update(new ...

33. how: many-to-many with composite key attribute    forum.springsource.org

Hello guys i understand and i did without problem a relation many-to-many between 2 classes but when each has one varibale how pk/id like http://www.hibernate.org/hib_docs/v3...ional-join-m2m Code: ...

34. Duplicate key - org.springframework.dao.DataIntegrityViolationExce ption    forum.springsource.org

hi... i m working on spring hibernate .... client server architecture... we hv common database in development environment.... when two person persist the same object in different scenarios the duplicate key ...

35. SimpleJdbcInsert - help with autogenerated key    forum.springsource.org

SimpleJdbcInsert - help with autogenerated key I am trying to use SimpleJdbcInsert to insert a row and return the autogenerated key. If I simply call the execute() method it works fine ...

36. SimpleJdbcInsert and auto-generated key problem?    forum.springsource.org

SimpleJdbcInsert and auto-generated key problem? I'm using SimpleJdbcInsert object for inserting new record into Oracle 10g database. Table consists of two columns. id for pkey, and name for description. I wanna ...

37. OScache: Retrieving Map keys    forum.springsource.org

OScache: Retrieving Map keys Hi, We're using OScache via the GeneralCacheAdministrator. I've been asked to create an interface where the superuser would see the list of all existing keys on the ...

38. Message Key    forum.springsource.org

Hi, I would like to customize the message generated by Acegi when configuring ConcurrentSessionControllerImpl Maximum sessions of 1 for this principal exceeded ... to one that my users would understand. What ...

39. Returning autogenerated keys is not supported    forum.springsource.org

Hi all, I am migrating my spring-based project from mysql to postgresql. I am using spring-jdbc and I was taking advantage of the GeneratedKeyHolder to retrieve the autogenerated id's. I know ...

40. JSP OptionsTag and SelectTag compare raw Map key - resolved?    forum.springsource.org

JSP OptionsTag and SelectTag compare raw Map key - resolved? Hello there, I am wondering if this issue (one of the last issues from the 2.5.2 changelog): "JSP OptionsTag and SelectTag ...

41. Problem seeting a command object variable that references a foreign-key from jsp page    forum.springsource.org

Mar 24th, 2008, 08:07 PM #1 prats_a View Profile View Forum Posts Private Message Junior Member Join Date Mar 2008 Posts 2 Problem seeting a command object variable that references a ...

42. Displaying foreign key data    forum.springsource.org

Displaying foreign key data Hi, I'm currently working on a project which has certain restrictions on where & how to store data. The frontend server has to retrieve all data by ...

43. Form tag response to Enter keypress    forum.springsource.org

Form tag response to Enter keypress I'm pretty interested to know if anyone has encountered this strange behavior of the tag with the Enter key press. Scenario: This is a ...

44. AbstractTransactionalDataSource... hibernate key generator    forum.springsource.org

AbstractTransactionalDataSource... hibernate key generator Hi I got a strange problem using AbstractTransactionalDataSourceSpringContextTests with hibernate. I use this class is use to create junit test for my dao. As everything I do ...

45. How to allow empty key list in DrivingQueryItemReader    forum.springsource.org

How to allow empty key list in DrivingQueryItemReader Hi How can I allow empty key lists in DrivingQueryItemReader? In http://jira.springframework.org/browse/BATCH-413 Lucas Ward suggests that it can be done by using some ...

46. jpaTemplate.find(class,pk) generates unordered key WHERE clause    forum.springsource.org

jpaTemplate.find(class,pk) generates unordered key WHERE clause I notice in my logs that a jpaTemplate.find() generates SQL with the keys in the reverse order. Everything works fine, but I am concerned as ...

47. Spring Batch schema and primary keys    forum.springsource.org

Spring Batch schema and primary keys I'm in the process of introducing Spring Batch into our group's applications, and some questions came up during the review of the BATCH_* tables used ...

48. java.util.Map: use .class objects as key value?    forum.springsource.org

Dear all Is there a way to inject .class objects into a java.util.Map as the key value? Something like this (which doesn't work of course): Code: ...

49. SkipLimit - using same keys    forum.springsource.org

SkipLimit - using same keys Hi, The scenario is reading from the database and spewing onto a file with skip limits to be configured. As a test 4 records available in ...

50. ItemWriterRetryPolicy passes 'key' instead of 'item' to FailedItemIdentifier    forum.springsource.org

ItemWriterRetryPolicy passes 'key' instead of 'item' to FailedItemIdentifier Hi, The protected hasFailed() method in ItemWriterRetryPolicy accepts the FailedItemIdentifier and the "key". It calls failedItemIdentifier.hasFailed(key); when it should probably be the actual ...

51. JpaTemplate and Composite Key    forum.springsource.org

JpaTemplate and Composite Key Hi: Is there any example of how to use JpaTemplate with composite key? I have defined my composite key and the Entity. Now i want to query ...

52. Composite Keys    forum.springsource.org

Composite Keys Hello, I have a normal table and a table with composite key, when mapping the applicationContext.xml I used Code: ...

53. key press event.    forum.springsource.org

hi everyone, I want to call controller on keypress event so if anyone have idea how to call controller on keypress event... tell me... thanks...

54. retrieving primary key problem    forum.springsource.org

retrieving primary key problem I am having problem to retrieve primary key after the insert statement. It seems that it works just fine when running against regular table, but when I ...

55. How to get Map key in form:checkboxes    forum.springsource.org

Thanks , Sorry I wasn't so clear with what I'm looking for. I know that this will return itemValue as the map value and item ID as map key Code:

56. jdbcTemplate Oracle and auto generated keys    forum.springsource.org

jdbcTemplate Oracle and auto generated keys i'm trying to use auto-generated key example straight out of spring reference guide (section 11.2.9). DB is Oracle 10g and driver is ojdbc-10g.jar. Table has ...

57. Get auto generated keys with JdbcTemplate    forum.springsource.org

Auto generated keys with JdbcTemplate update(sql) Hello, I'd like to retrieve autogenerated keys using JdbcTemplate. I found a way to do it, but I would like to find a more elegant/simple ...

58. No value for key [... LocalContainerEntityManagerFactoryBean@    forum.springsource.org

Hi All! We r using JBoss Portal 2.6.6 + JSF RI and Spring 2.5.5 Sometimes we got this ugly exception in log: Code: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentOwnerRegistrationController' defined ...

59. Key accelerator for custom action    forum.springsource.org

Key accelerator for custom action Hi all, I want to use a key accelerator in order to execute a custom action. The current focused component never mind in my case. What's ...

60. How can I iterate all key values of Spring JSTLView    forum.springsource.org

How can I iterate all key values of Spring JSTLView Migrating from my existing jstl to JSTL support in Spring Tag. So I used Code: org.springframework.web.servlet.view.JstlView

61. HibernateTemplate.save to return trigger generated primary key    forum.springsource.org

HibernateTemplate.save to return trigger generated primary key Hi, I'm looking to use the public Serializable save(Object*entity) method of HibernateTemplate to retrieve the trigger generated primary key of the object just added. ...

62. Restart with key instead of counter    forum.springsource.org

Is there any support for restart positoning after a failure using a database key value instead of a itemcounter? Havent found anything in 1.1.3 - maybe in 2.0? The counter tecnique ...

63. Exception while looking up key via messageSource    forum.springsource.org

Exception while looking up key via messageSource Hi I need to translate some text in my domain objects (for specific reports) and want to use the spring-defined language properties files. I ...

64. hbm2ddl ignores my foreign-key name    forum.springsource.org

hbm2ddl ignores my foreign-key name hi.. using hibernate 2.1.7 when i specify this: it creates ...

65. Hibernate multi primary key    forum.springsource.org

Hello I was wondering that is hibernate any other way mapped tables by two columns as an primary key (i know that composite-id tag is one way, but is there any ...

66. composite foreign key    forum.springsource.org

composite foreign key hi all wierd situation. Let me just say before, I begin, that I have to do this this way, if it were up to me I would just ...

67. How to update a composite-key?    forum.springsource.org

Hello all: I'm having problem updating the primary key (which is a composite key) of a table using Hibernate/JPA I have a Person object and a Spouse Object. Code: Person ------- ...

68. No value for key - SingleConnectionDataSource    forum.springsource.org

I am receiving 'No value for key [org.springframework.jdbc.datasource.SingleConnecti onDataSource@1ebd75b] bound to thread' errors at random areas when trying to load DB2 tables with data. Any ideas? It is only happening when ...

69. SimpleUrlHandlerMapping prop key is not identifying...    forum.springsource.org

May 22nd, 2009, 09:22 AM #1 bhaskar.javatech View Profile View Forum Posts Private Message Junior Member Join Date May 2009 Posts 5 SimpleUrlHandlerMapping prop key is not identifying... Hi, In my ...

70. enums as key for map    forum.springsource.org

Code: private OsWorkflowTemplate getAuditWorklfowTemplateByOrg(OrgAbbrev orgAbbrev){ OsWorkflowTemplate osWorkflowTemplate=auditWorkflowTemplateByagency.get(orgAbbrev); if(osWorkflowTemplate==null)throw new NullPointerException(MessageFormat.format("No Audit Workflow template found for agency {0}", orgAbbrev)); return osWorkflowTemplate; } the key in the ...

71. Foreign key using hibernate Annotation    forum.springsource.org

Jun 18th, 2009, 08:00 AM #1 scropio80 View Profile View Forum Posts Private Message Junior Member Join Date May 2009 Posts 3 Foreign key using hibernate Annotation Hi. I have two ...

72. ACL with Non Integer Primary keys (Like buty [])    forum.springsource.org

ACL with Non Integer Primary keys (Like buty []) Hello, Based on all the examples I have seen, it looks like the default ACL implementation needs the domain objects to have ...

73. getting keys of map    forum.springsource.org

getting keys of map hi is it possible somehow to get keys from map defined in one bean and assign them as values to variables (i.e. items of list) in other ...

74. Hibernate Primary Key    forum.springsource.org

Hibernate Primary Key Hey guys, In Hibernate whats the difference between @Generate and @GeneratedValue annotation? Also, I've been looking into primary key generation issues. When i add @SequenceGenerator(name = "Seq_Gen", sequenceName ...

75. Batch Insert Return Key?    forum.springsource.org

Batch Insert Return Key? I have two entities that have a many to many relationship with each other and a join table to map the relationships. Each of the entities has ...

76. BATCH_JOB_PARAMS: primary key    forum.springsource.org

Hi, I read your philosophy on not having a primary key on this table. But is it correct? In our application, transaction tables like this always have a (surrogate) primary key. ...

77. JpaTemplate Strange Behavior find by primary key    forum.springsource.org

Code: @Embeddable public MyKey { private String id; } @Entity public MyClass { @EmbeddedId private MyKey key; @ManyToMany private List objectList; } public MyDao extends JpaDaoSupport { public MyClass fetchBy(MyKey key){ ...

78. util:map key-type="java.lang.Class"    forum.springsource.org

Hi experts, Is there a working example-xml-snippet wich shows correct usage of a Map bean-definition? Code: should be mapped to Code: @Autowired @Qualifier("myMap") ...

79. Duplicate entry for key    forum.springsource.org

Hello, When i save this class. Code: @Entity @RooEntity @RooJavaBean @RooToString public class Productgroup { @NotNull @Size(max = 30) private String name; @OneToMany(cascade = CascadeType.ALL) private Set prefixes = new HashSet(); ...

80. Oracle, SimpleJdbcInsert and auto generated keys    forum.springsource.org

Hi, With Oracle 10 R2, it is possible to use automatic key generation and retrieval, with jdbc like this : PreparedStatement ps = conn.prepareStatement("INSERT INTO TABLE (ID, COL1) values (ID.NEXTVAL, ?)";, ...

81. queryForMap returned Map's key in which case?    forum.springsource.org

Hi All, when you use queryForMap API what would be the key case in the returned Map by the Spring JDBC ?? is there any detailed article or documentation where i ...

82. Setting a default foreign key with hibernate annotations    forum.springsource.org

Hi Buddy, I am not sure about other issues in the code you are developing, and this not a problem with Spring. This is the technique in Hibernate, You can set ...

83. ErrorMessages display with both key and value    forum.springsource.org

ErrorMessages display with both key and value Anyone? Error messages are displayed with both the key, appended with the bind name and the message itself. E.g I have a validator creating ...

84. Composit Primary Key Issues    forum.springsource.org

Oct 14th, 2009, 03:12 PM #1 rgojji View Profile View Forum Posts Private Message Junior Member Join Date Oct 2009 Posts 1 Composit Primary Key Issues I am having issues getting ...

85. Already value for key bound to thread    forum.springsource.org

Already value for key bound to thread Hi everyone, Our application runs on Weblogic 10.3 with spring (2.5.6)+hibernate (3.2.6.ga)(everthing POJO). But randomly we see following exceptions in the logs; Code:

86. Map with custom class as key    forum.springsource.org

Map with custom class as key Hi, I want to inject a map with a class I created as key: Code:

87. STS 2.2.1 No short cut key for Grails command prompt    forum.springsource.org

STS 2.2.1 No short cut key for Grails command prompt I installed STS 2.2.1 and added Groovy and Grails support. It works well. However, there is not short cut key for ...

88. key conflict in STS version 2.2.1    forum.springsource.org

Bringing up the grails popup command window shows a key conflict for the key combination CTRL-ALT-G. How can I disable the other command? I would like to keep the CTRL-ALT-G combination ...

89. Problem inserting foreign key with form:select tag    forum.springsource.org

Problem inserting foreign key with form:select tag Hello all, I've a problem inserting a foreign key using form:select: This is my POJO: Code: public class User implements java.io.Serializable { private int ...

90. Composite Key - the @IdClass support    forum.springsource.org

we have a code generation tools in our project, and when i tried to migrate them to work with ROO, there's some problem. the entity we generated when there's a composite ...

91. StepExecution keys - need some help    forum.springsource.org

Maybe put all of the information into a List and put that list (serialized) into the context? That way you don't need to know the individual names, you could just iterate ...

92. Generating primary keys in Spring    forum.springsource.org

Hello Are there any tools for generating primary keys in spring (like hibernate's and jpa GenerationType AUTO, NATIVE and so on...) ? Thanks for answers

93. How to change primary key generation strategy?    forum.springsource.org

The experts will correct me if I am wrong. But you should be able to add your own id to your class, and add those annotations and Roo now won't generate ...

94. HashMap key set as null after submit    forum.springsource.org

I have a HashMap as model object to capture the form in value of the hashmap and I use the LazyMap for initialization and it works fine to display the form ...

95. jsp page contents appear only after pressing the return key one or more times    forum.springsource.org

My jsp page content sometimes does not appear immediately pressing after the return key at the browser. i.e. the jsp page is blank (empty). The jsp page content will appear eventually ...

96. Controller get correct data when "apply" button is clicked but not from key    forum.springsource.org

Controller get correct data when "apply" button is clicked but not from key The group button in my form is set to "unack". The Spring ParameterizableViewController (HwController.java) receive the correct ...

97. JdbcPagingItemReader, sort key is TIMESTAMP    forum.springsource.org

JdbcPagingItemReader, sort key is TIMESTAMP I'm trying to set up a batch job using JdbcPagingItemReader connected to DB2. The sort key column I configure is of type TIMESTAMP. The initial pagesize ...

98. Why is message bundle key getting put in the URL?    forum.springsource.org

Why is message bundle key getting put in the URL? Hi, I'm using Spring 3.0. After updating/adding something in the database, I want to display a success message to the user. ...

99. the use of Symmetric Key store in keyStoreCallbackHandler    forum.springsource.org

the use of Symmetric Key store in keyStoreCallbackHandler Hello there, I am trying to secure a spring web service by encrypting the SOAP:Body. For not transporting the secret key in the ...

100. Composite key as foreign key problem.    forum.springsource.org

Composite key as foreign key problem. Hi, I have 2 tables.DEPARTMENT and TEACHER.DepartmentPK(schoolCode,departmentCode) and TeacherPK(shcoolCode,teacherCode) are the Primary Key entities of the corresponding entities Department and Teacher for these tables.I have ...