Skip to content

Commit

Permalink
Fixes recursion error in toString thatcan occur with collection types
Browse files Browse the repository at this point in the history
  • Loading branch information
miho committed Apr 5, 2019
1 parent ef3b651 commit 860eee8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/common.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# version number (is used for core, runtime and default dependencies in plugin and plugin)
# publication.version = 0.3-SNAPSHOT
publication.version = 0.3-SNAPSHOT
publication.version = 0.2.4
17 changes: 14 additions & 3 deletions core/src/main/java/eu/mihosoft/vmf/core/Refers.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,26 @@
import java.lang.annotation.*;

/**
* Used to define a cross reference (linking releationship).
* Used to define a cross reference (bidirectional linking relationship).
* <h3>Example Model:</h3>
* <pre><code>
* package mypkg.vmfmodel;
*
* import eu.mihosoft.vmf.core.*;
*
* Todo add code
*
* interface Book {
* String getTitle();
*
* @Refers(opposite="books")
* Writer[] getAuthors();
* }
*
* interface Writer {
* String getName();
*
* @Refers(opposite="authors")
* Book[] getBooks();
* }
* </code></pre>
*
* <p>Created by miho on 12.03.2019.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@

#foreach ($prop in $type.implementation.properties)
#if (${prop.isIgnoredForToString()} == false)
#if ($prop.containmentInfo.containmentType != "CONTAINER" )
#if ($prop.containmentInfo.containmentType == "CONTAINED" && $prop.propType == "COLLECTION")
#if (${prop.containmentInfo.containmentType} != "CONTAINER" )
#if ( (${prop.containmentInfo.containmentType} == "CONTAINED" || ${prop.crossRefProperty}) && ${prop.propType} == "COLLECTION")

// -- writing collection param '$prop.name'
//
Expand Down

0 comments on commit 860eee8

Please sign in to comment.