Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

I guess I need to put the @Column definition somewhere: how could JPA possibly know that the newField column (mapped through ImprovedNamingStrategyImprovedNamingStrategy to new_field on the database) is retrieved through the value property of the FooSequence entity ?

I guess I need to put the @Column definition somewhere: how could JPA possibly know that the newField column (mapped through ImprovedNamingStrategy to new_field on the database) is retrieved through the value property of the FooSequence entity ?

I guess I need to put the @Column definition somewhere: how could JPA possibly know that the newField column (mapped through ImprovedNamingStrategy to new_field on the database) is retrieved through the value property of the FooSequence entity ?

Not a Struts2 problem
Link
Roman C
  • 1
  • 33
  • 71
  • 194
added 1300 characters in body
Source Link
Andrea Ligios
  • 50.4k
  • 29
  • 127
  • 256

EDIT

As asked in comments, this is the persistence.xml:

<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="MyService" transaction-type="JTA"> <jta-data-source>java:jboss/datasources/myDS</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" /> <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy"/> <property name="hibernate.query.substitutions" value="true 'Y', false 'N'"/> <property name="hibernate.show_sql" value="true" /> <property name="format_sql" value="true" /> <property name="use_sql_comments" value="true" /> </properties> </persistence-unit> </persistence> 

EDIT

As asked in comments, this is the persistence.xml:

<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="MyService" transaction-type="JTA"> <jta-data-source>java:jboss/datasources/myDS</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" /> <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy"/> <property name="hibernate.query.substitutions" value="true 'Y', false 'N'"/> <property name="hibernate.show_sql" value="true" /> <property name="format_sql" value="true" /> <property name="use_sql_comments" value="true" /> </properties> </persistence-unit> </persistence> 
Notice removed Draw attention by Andrea Ligios
Bounty Ended with anttix's answer chosen by Andrea Ligios
added 355 characters in body; edited title
Source Link
Andrea Ligios
  • 50.4k
  • 29
  • 127
  • 256
Loading
Notice added Draw attention by Andrea Ligios
Bounty Started worth 50 reputation by Andrea Ligios
added 1506 characters in body
Source Link
Andrea Ligios
  • 50.4k
  • 29
  • 127
  • 256
Loading
Source Link
Andrea Ligios
  • 50.4k
  • 29
  • 127
  • 256
Loading