Closed fenix01 closed 5 years ago
Hi !
First of all each entity requires an ID ( if you list the model's entities with "le" you shoul see a red "(!)" to indicate the invalid entities ) So add @Id for a field in each entity Example :
File {
name : string { @Id } ; // this field is the id
}
Folder {
id_: string { @Id } ; // this field is the id
name : string ;
files: File [ ];
}
Second point : each reference to another entity is a "link" You can get the links by using "$entity.links" Example :
#foreach( $link in $entity.links )
$link.fieldName
#end
Hi ! Thank you for your reply. I tried your code, and it works perfectly ! :)
Hi !
In first, I'd like to thank you for this project. I was looking for a simple code generation tool for my own python project, and this one works very nice. I don't like UML :)
I'm trying to create an entity with an attribute that refers to a collection, but it doesn't work at all. I created 2 files (one named Folders.entity and the other one named File.entity). My goal is to create a class with an attribute that refers to a list of sub documents (NoSQL).
During the generation, this attribute (files) doesn't exist. I put the following code in a .vm file :
And it only displays the id_, and name attribute). Do you know where the problem comes from ? I'm using telosys (3.1.0).