Well, Crawling the web for an answer, finding it myself and assuming I did not find the stuff on the internet, I'll put it here instead of deleting the question. Please be aware it is really stupid.
I did not have a high comprehension of the language used. Because of this I wrongly assumed
<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
was the correct place to put my code generation over. It was not. The correct place is actualy:
<#=codeStringGenerator.EntityClassOpening(entity)#> : DataObject
Maybe this post will help someone having the same problem, just needind to be told to search somewhere else.
Have fun.