|
|
Re: How to create annotations with attributes [message #904083 is a reply to message #903859] |
Mon, 27 August 2012 18:06 |
Roger Gilliar Messages: 40 Registered: March 2010 |
Member |
|
|
I tried but I can make no sense of this API. So far I get @Column("Name") but I would like tot get @Column(test="Name"). My code looks like this:
val field = f.toField(f.name, f.type) [
annotations += f.toAnnotation("javax.persistence.Column") => [
values += createJvmStringAnnotationValue() => [
values += "Name"
]
]
]
I would have expected that the following code should work:
val field = f.toField(f.name, f.type) [
annotations += f.toAnnotation("javax.persistence.Column") => [
values += createJvmStringAnnotationValue() => [
values += "Name"
valueName = "test" // but valueName ist read only
]
]
]
But valueName is read only.
Regards
Roger
[Updated on: Mon, 27 August 2012 18:06] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03922 seconds