Hi All,

I am using camel and below is the

<route id="_route1">
            <from id="_from1" uri="timer:foo?period=5s"/>
            <to id="_to1"
uri="hibernate:com.x.dto.ReferenceTable?consumer.namedQuery=selectQuery"/>
            <log id="_log1" message="selected ${body}"/>
        </route>

Refference Table

@Entity
@Table(name="REFFERENCE_TABLE")
@NamedQuery(name = "selectQuery", query = "select m from ReferenceTable m ")
public class ReferenceTable {
        
        @Id
        @GeneratedValue(strategy=GenerationType.IDENTITY)
        private String key;
        @Column
        private String value;
        
        public String getKey() {
                return key;
        }
        public void setKey(String key) {
                this.key = key;
        }
        public String getValue() {
                return value;
        }
        public void setValue(String value) {
                this.value = value;
        }
}

I am not sure why it inserts instead of search

com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value
NULL into column 'key', table 'Maxtest.dbo.REFFERENCE_TABLE'; column does
not allow nulls. INSERT fails.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-hibernate-issue-with-Select-tp5801204.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to