-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: findByPk with a pk enum
PostPosted: Thu Jun 01, 2006 4:11 pm 
Newbie

Joined: Thu Jun 01, 2006 4:03 pm
Posts: 2
Hello folks, i am trying to do a findByPk with a pk that have one of his attributes an enum, so when hibernate do the load he throws a exception, because the field in the database is an Integer an the enum is sending a String

org.hibernate.exception.SQLGrammarException: could not load an entity: [com.waybrasil.model.persistence.servicocontratado.ServicoContratado#component[codigoReceita,codigoGrupoServico,ponto,codigoServico,cidade,contrato]{contrato=367971, codigoGrupoServico=291, [size=18][b]codigoReceita=Internet[/b][/size], codigoServico=238, cidade=50, ponto=1}]


see codigoReceita= Internet should be 8


tanx


LucasFMR


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 02, 2006 1:07 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
You'll need a user type. Perhaps one of the variations in this page can help: http://www.hibernate.org/272.html

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.