Wiki

Clone wiki

Marshmallow / FAQ

Frequently asked questions

  1. Does "Marshmallow" manages the lifetime of your entities objects? No. What you create, you must also free. "Marshmallow" does not change your coding style by managing your objects lifetime.
  2. Why I should use Criteria API? Obviously you are not forced to do this. You can write your SQL queries anytime you want. But using Criteria API helps you untie from concrete database vendor so you can change your database engine anytime you want.
  3. How to know if I need to update my entity or to insert it? Most of the time you don't need to know. You can just call Session.Save and framework will decide which action should be taken based on your entity's state.
  4. I know that "Marshmallow" can create or update database structure from my entities. Should I use it anytime I change something in my database? We do not suggest you to do this. Mostly it is a good practice to create database tables from entities only on first launch of your application. In order to correctly handle each change of the database structure you will need to adapt database versioning system (e.g. Liquibase or other tools).
  5. Is there an easy way to generate Delphi entities from the database? Framework includes a simple code generator application which can connect to any database and generate entities from it's tables. Application and it's sources can be found in our repository.
  6. Which Delphi versions are being supported? Currently "Marshmallow" supports any Delphi version starting from Delphi XE.
  7. Why use collections from Spring instead of internal Generics.Collections? Mainly because Spring collections are better and more flexible. Also they are implemented as interfaces so you don't need to worry about freeing them. Another advantage is powerful IEnumerable interface.

Updated