You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-fr...@googlegroups.com
Hi All,
By default JPA in playframework defines string as varchar(255). Can we increase the length of the String field to a values I want ? If so could you please help me out as to how ? Is there an annotation to do this ?
Cheers,
Akash A
Mikael
unread,
Sep 26, 2012, 3:49:10 AM9/26/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-fr...@googlegroups.com
@Column(columnDefinition = "nvarchar(500)", nullable = true) public String field;
biesior
unread,
Sep 26, 2012, 6:34:47 AM9/26/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-fr...@googlegroups.com
Mikael's answer relates to SQL Server, of course for other databases you should use another types in columnDefinition, ie text for MySQL (btw it was easier to guess if you wrote which DB are you using)
Mathias Clerc
unread,
Sep 26, 2012, 8:28:24 PM9/26/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-fr...@googlegroups.com
Or you can use @Column(length = 300) to let JPA guess the column type
If you want to store very large text, you can use @Lob which has no
size limit (but is heavier on the DB)