Re: GWT+hibernate annotations+persisting Enum

2011-09-26 Thread Juan Pablo Gardella
Can you share the stack trace?

2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



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...

2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



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
propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
in
hibernate manual reference, the *Enumerated *annotation.

2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



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(name, BoundType.UPPER);
hibernateTemplate.save(bt);

and says that i try to insert type as Integer ...

Thanks for trying to help me

2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Use JPA2 if you can, it has native support to enums. See Mapping simple
 propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
  in
 hibernate manual reference, the *Enumerated *annotation.


 2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



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 markoborge...@gmail.com

 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(name, BoundType.UPPER);
 hibernateTemplate.save(bt);

 and says that i try to insert type as Integer ...

 Thanks for trying to help me

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Use JPA2 if you can, it has native support to enums. See Mapping simple
 propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
  in
 hibernate manual reference, the *Enumerated *annotation.


 2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



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 gardellajuanpa...@gmail.com

 What jpa providers (and version) are you use?


 2011/9/26 Marko Borges markoborge...@gmail.com

 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(name, BoundType.UPPER);
 hibernateTemplate.save(bt);

 and says that i try to insert type as Integer ...

 Thanks for trying to help me

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Use JPA2 if you can, it has native support to enums. See Mapping simple
 propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
  in
 hibernate manual reference, the *Enumerated *annotation.


 2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



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 markoborge...@gmail.com

 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 gardellajuanpa...@gmail.com

 What jpa providers (and version) are you use?


 2011/9/26 Marko Borges markoborge...@gmail.com

 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(name, BoundType.UPPER);
 hibernateTemplate.save(bt);

 and says that i try to insert type as Integer ...

 Thanks for trying to help me

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Use JPA2 if you can, it has native support to enums. See Mapping simple
 propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
  in
 hibernate manual reference, the *Enumerated *annotation.


 2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



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 markoborge...@gmail.com

 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 gardellajuanpa...@gmail.com

 What jpa providers (and version) are you use?


 2011/9/26 Marko Borges markoborge...@gmail.com

 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(name, BoundType.UPPER);
 hibernateTemplate.save(bt);

 and says that i try to insert type as Integer ...

 Thanks for trying to help me

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Use JPA2 if you can, it has native support to enums. See Mapping simple
 propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
  in
 hibernate manual reference, the *Enumerated *annotation.


 2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit 

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 markoborge...@gmail.com

 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... i think that if
 some gwt library was making conflict with hibernate library it would send an
 error so i dont know why this happens...

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 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 markoborge...@gmail.com

 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 gardellajuanpa...@gmail.com

 What jpa providers (and version) are you use?


 2011/9/26 Marko Borges markoborge...@gmail.com

 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(name, BoundType.UPPER);
 hibernateTemplate.save(bt);

 and says that i try to insert type as Integer ...

 Thanks for trying to help me

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Use JPA2 if you can, it has native support to enums. See Mapping
 simple 
 propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
  in
 hibernate manual reference, the *Enumerated *annotation.


 2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You 

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 (where i have my mapped objects like:

@Entity

@Table(name = boundtype, schema = SchemaTableConfig.SCHEMA2)

public class Boundtype implements Serializable {

private static final long serialVersionUID = 1L;

private String nodename;

private BoundType type;


public Boundtype() {

}


public Boundtype(String nodename, BoundType type) {

this.nodename = nodename;

this.type = type;

}
@Id

@Column(name = nodename, unique = true, nullable = false, columnDefinition
= text)

public String getNodename() {

return this.nodename;

}


public void setNodename(String nodename) {

this.nodename = nodename;

}

@Enumerated(EnumType.STRING)

public BoundType getType() {

return this.type;

}

...


2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the classpath? In what servlet container are you running or
 you make a test?

 Juan


 2011/9/26 Marko Borges markoborge...@gmail.com

 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... i think that if
 some gwt library was making conflict with hibernate library it would send an
 error so i dont know why this happens...

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 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 markoborge...@gmail.com

 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 gardellajuanpa...@gmail.com

 What jpa providers (and version) are you use?


 2011/9/26 Marko Borges markoborge...@gmail.com

 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(name, BoundType.UPPER);
 hibernateTemplate.save(bt);

 and says that i try to insert type as Integer ...

 Thanks for trying to help me

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Use JPA2 if you can, it has native support to enums. See Mapping
 simple 
 propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
  in
 hibernate manual reference, the *Enumerated *annotation.


 2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web 

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 markoborge...@gmail.com

 -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 (where i have my mapped objects like:

 @Entity

 @Table(name = boundtype, schema = SchemaTableConfig.SCHEMA2)

 public class Boundtype implements Serializable {

  private static final long serialVersionUID = 1L;

  private String nodename;

  private BoundType type;


  public Boundtype() {

  }


  public Boundtype(String nodename, BoundType type) {

  this.nodename = nodename;

  this.type = type;

  }
 @Id

 @Column(name = nodename, unique = true, nullable = false,
 columnDefinition = text)

 public String getNodename() {

  return this.nodename;

  }


 public void setNodename(String nodename) {

  this.nodename = nodename;

  }

  @Enumerated(EnumType.STRING)

  public BoundType getType() {

  return this.type;

  }

 ...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the classpath? In what servlet container are you running or
 you make a test?

 Juan


 2011/9/26 Marko Borges markoborge...@gmail.com

 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... i think that if
 some gwt library was making conflict with hibernate library it would send an
 error so i dont know why this happens...

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 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 markoborge...@gmail.com

 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 gardellajuanpa...@gmail.com

 What jpa providers (and version) are you use?


 2011/9/26 Marko Borges markoborge...@gmail.com

 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(name, BoundType.UPPER);
 hibernateTemplate.save(bt);

 and says that i try to insert type as Integer ...

 Thanks for trying to help me

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Use JPA2 if you can, it has native support to enums. See Mapping
 simple 
 propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
  in
 hibernate manual reference, the *Enumerated *annotation.


 2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the
 Google Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit 

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 gardellajuanpa...@gmail.com

 BoundType isn't an enum. It must be:

 enum BoundType {
 ...

 }



 2011/9/26 Marko Borges markoborge...@gmail.com

 -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 (where i have my mapped objects like:

 @Entity

 @Table(name = boundtype, schema = SchemaTableConfig.SCHEMA2)

 public class Boundtype implements Serializable {

  private static final long serialVersionUID = 1L;

  private String nodename;

  private BoundType type;


  public Boundtype() {

  }


  public Boundtype(String nodename, BoundType type) {

  this.nodename = nodename;

  this.type = type;

  }
 @Id

 @Column(name = nodename, unique = true, nullable = false,
 columnDefinition = text)

 public String getNodename() {

  return this.nodename;

  }


 public void setNodename(String nodename) {

  this.nodename = nodename;

  }

  @Enumerated(EnumType.STRING)

  public BoundType getType() {

  return this.type;

  }

 ...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the classpath? In what servlet container are you running or
 you make a test?

 Juan


 2011/9/26 Marko Borges markoborge...@gmail.com

 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... i think that if
 some gwt library was making conflict with hibernate library it would send 
 an
 error so i dont know why this happens...

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 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 markoborge...@gmail.com

 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 gardellajuanpa...@gmail.com

 What jpa providers (and version) are you use?


 2011/9/26 Marko Borges markoborge...@gmail.com

 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(name, BoundType.UPPER);
 hibernateTemplate.save(bt);

 and says that i try to insert type as Integer ...

 Thanks for trying to help me

 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Use JPA2 if you can, it has native support to enums. See Mapping
 simple 
 propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property
  in
 hibernate manual reference, the *Enumerated *annotation.


 2011/9/26 Marko Borges markoborge...@gmail.com

 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...


 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Can you share the stack trace?

 2011/9/26 Marko Borges markoborge...@gmail.com

 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 this message because you are subscribed to the
 Google Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the
 Google Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are