sql - Unable to convert between java.lang.Integer and BINARY.- Spring -
i have following dto use persist new records database
@entity(name = "user") public class user { @id @column(name = "user_id") private long userid; @column(name = "user_name") private string usernm; @column(name = "years_active") private long years; @manytoone(cascade = cascadetype.all) @joincolumn(name = "manager_id", insertable = false, updatable = false) private manager manager; @column(name = "projects",insertable = false, updatable = false) private linkedhashmap<long, string> projects; @column(name = "projects") private long projectid; @column(name = "address") private address address; //getters & setters }
ddl:
create table [dbo].[user] ( [user_id] int not null, [user_name] varchar(255) not null, [years_active] int not null, [manager_id] int not null, //fk manager table [projects] int not null, //fk project table [address] int null, //fk address table [modifiedby] varchar(255) not null, [modifiedts] datetime null)
i have no problem persisting data table via form submission, when try retrieve entity object using spring repository:
user user = userrepo.findone(id); // id == long, passed through @controller method
i consistently following error : unable convert between java.lang.integer , binary.
o.h.engine.jdbc.spi.sqlexceptionhelper : unable convert between java.lang.integer , binary. o.h.e.internal.defaultloadeventlistener : hhh000327: error performing load command : org.hibernate.exception.dataexception: not read entity state resultset : entitykey[com.myapp.entities.user#3]
i'm not sure conversion between integer , binary happening; ideas?
Comments
Post a Comment