Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Marko Borges
no... i actually have an enum called BoundType and an entity class called Boundtype. My enum is: public enum BoundType { UPPER, LOWER, REF; } my Boundtype is what i showed u before 2011/9/26 Juan Pablo Gardella > BoundType isn't an enum. It must be: > > enum BoundType { > ... > > } > > > > 2011

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Juan Pablo Gardella
BoundType isn't an enum. It must be: enum BoundType { ... } 2011/9/26 Marko Borges > -src > --com.nameproject.client.services (where I use Services and ServicesAsync > and my EntryPoint) > --com.nameproject.server (where I have my ServicesImpl) (for example: > hibernateTemplate.save(object))

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Marko Borges
-src --com.nameproject.client.services (where I use Services and ServicesAsync and my EntryPoint) --com.nameproject.server (where I have my ServicesImpl) (for example: hibernateTemplate.save(object)) --com.nameproject.shared.enums (my enum that i showed u before) --com.nameproject.shared.entities (

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Juan Pablo Gardella
Can you share the classpath? In what servlet container are you running or you make a test? Juan 2011/9/26 Marko Borges > I updated to version 3.6.7 final version and it looks that the same happens > :( > > Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into > boundtype (type, na

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Marko Borges
I updated to version 3.6.7 final version and it looks that the same happens :( Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into boundtype (type, name) values ('0', 'name') was aborted. Call getNextException to see the cause. I saw the cause and it is trying to insert integer 0

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Juan Pablo Gardella
Sure, hibernate 3.2.5 not support jpa2 :), yes you must update your hibernate version, for example to 3.6.x. Version 4 I'm not sure if is stable. 2011/9/26 Marko Borges > Guess I have to update my Hibernate. I am using version 3.2.5 and maybe > need at least 3.5 to use JPA2. > > Am I correct? >

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Marko Borges
Actually i am using hibernate-jpa-2.0-api-1.0.0.Final.jar I think it is supposed to work... 2011/9/26 Marko Borges > Guess I have to update my Hibernate. I am using version 3.2.5 and maybe > need at least 3.5 to use JPA2. > > Am I correct? > > Thanks Juan, really!!! > > > 2011/9/26 Juan Pablo G

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Marko Borges
Guess I have to update my Hibernate. I am using version 3.2.5 and maybe need at least 3.5 to use JPA2. Am I correct? Thanks Juan, really!!! 2011/9/26 Juan Pablo Gardella > What jpa providers (and version) are you use? > > > 2011/9/26 Marko Borges > >> Well, thanks... >> >> I tried it and now

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Juan Pablo Gardella
What jpa providers (and version) are you use? 2011/9/26 Marko Borges > Well, thanks... > > I tried it and now says it tries to insert integer but i dont know why: > public enum BoundType { > UPPER, LOWER, REF; > } > > Im my class i have the attribute: > @Enumerated(EnumType.STRING) > public Bo

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Marko Borges
Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(na

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Juan Pablo Gardella
Use JPA2 if you can, it has native support to enums. See Mapping simple properties in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges > Says that the column is o

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Marko Borges
Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 20

Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Juan Pablo Gardella
Can you share the stack trace? 2011/9/26 Marko Borges > Hey everyone! > > I am having a problem in persisting a postgres enum using hibernate and > GWT. > > When i follow some instructions that i found around Web, it says that > client module does not support one class used to trick for persiste

GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Marko Borges
Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received