Persistence with Spring4D

My blog tagline is certainly no accident.  I have been interested in persistence frameworks for a long time, and thought I would use Spring4D’s Marshmellow ORM for a project.  Spring4D has been around for quite some time and just had it’s first conference in Italy so I figured the framework was mature and warranted a closer look.  I had previously used the Spring4D DI container, and decided this time to use Spring4D collections as well to avoid as much code bloat as possible.

The first thing I discovered is that the Spring persistence layer aka Marshmellow has a very unfortunate name.  Trying to google it with “delphi” leads to all sorts of hits related that Android version.  The next thing I learned is that development has been put on hold as of September 2018 due to a lack of resources.  This is unfortunate, as there are not that many open source ORMs that use the newer language features of Delphi when compared C# or Java.

The third thing I quickly learned is that other than the Tests, there is not a whole lot of documentation available.  There is the reference help which is really not that helpful.  It doesn’t contain descriptions of the class interactions or architecture and has no examples of usage.  Really it’s not much more informative than drilling through the code.  The best source of “getting started” help that I could find is the previous bitbucket repo. There is of course also the google groups if you need to get clarification of something, and reading previous posts can help you from running into common issues.

As a newbie, it’s not clear how the [InheritenceAttribute()] works so I will have to investigate it further. I assume if the last descendant in a class hierarchy is the only one marked as an entity, it will by default have all the fields marked with the Column() attribute in all ancestor classes.

Another thing that is not particularly clear from any documentation is how the underlying datatype employed by the database is determined.  There are really only 3 pertinent parameters supplied to the Column() attribute, namely length, precision and scale.  Length only applies to string types and precision, scale to numeric.  It is unclear how precision and scale effectively change the numeric datatype and it’s corresponding precision or scale, other than for Integer datatypes you specify 0,0 for precision,scale.

I’m sure all this will become clear as I use the framework more, but some more thorough ‘Getting Started’ documentation would have been really nice.

6 Responses to “Persistence with Spring4D”

  1. Stefaan Lesage Says:

    When I was at the Spring4D conference Stefan mentioned the Persistence framework but made clear to tell us that development on Marshmellow has been halted.

    But maybe someone can pick it back up again and help Stefan by starting with some nice documentation … hint … hint … hint :-)

  2. Christophe Says:

    Hi Larry,

    I see in the context that you was on the first conference of Spring4D in Italy. Was this in Bergamo? Because I was there and didn’t know that the man behind TPersistent in the same session was.

  3. Rodrigo Farias Rezino Says:

    It’s a good idea if you can write the documentation while you learn

  4. Fronzel Neekburm Says:

    How about you, as you get started, continue to write down your journey, ultimately creating a step-by-step tutorial?

  5. Larry Hengen Says:


    No I was not at the Spring4D conference. I live in Calgary, AB, Canada so it’s quite a trip for me to attend a European conference, and I have not done so to date. Hopefully in the future though.

  6. Larry Hengen Says:


    Thanks for the suggestion. In fact I do intend on continuing to blog about my experience with Spring4D’s ORM in the hope that it will make it easier for others to use the framework and to understand it’s strength’s and weaknesses so they can compare it with other offerings.

Leave a Reply