-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get primitive types in C# #1
Comments
Hi,
are you sure to use Telosys ver 3.1.2 ?
…On Sat, Apr 25, 2020 at 1:49 PM Franck LEVEQUE ***@***.***> wrote:
Hi,
Thanks for your great work,
However, I'm unable to get primitive types for C# (I'm currently using a
database model)
the construct I use is :
$env.setLanguage('C#')
#foreach( $attribute in $entity.attributes )
public ${attribute.type} ${attribute.name}
#end
I have also tried .fullType, .simpleType, none worked. They are always
translated as object types.
ie :
public Int32 Id
public String Label
whereas I would like to generate :
public int Id
public string Label
Is there something I'm missing ?
Thanks in advance,
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4IFKSPKFQISYLM5FEAM4DROLE3XANCNFSM4MQW2S3Q>
.
|
Hi, Components versions : Do we need to update the different components separately ? |
Your version is correct. |
The cause of this behaviour is that in a Database Model the attribute type is still stored as a Java type and this Java type determines the "native or object" nature. |
You can also create a Velocity macro to convert the "model neutral type" into your expected type. |
Ok, Thanks, I will go with neutralType for the moment. |
Hi,
Thanks for your great work,
However, I'm unable to get primitive types for C# (I'm currently using a database model)
the construct I use is :
$env.setLanguage('C#')
#foreach( $attribute in $entity.attributes )
public ${attribute.type} ${attribute.name}
#end
I have also tried .fullType, .simpleType, none worked. They are always translated as object types.
ie :
public Int32 Id
public String Label
whereas I would like to generate :
public int Id
public string Label
Is there something I'm missing ?
Thanks in advance,
The text was updated successfully, but these errors were encountered: