Build Status: ✅ All Tests Passing | Migration Complete
Maven Central:
License:
🎯 Migration Status: Successfully migrated to MetaObjects Core 6.2.6+ 📊 Test Results: 40+ tests passing across all modules 🔧 Build Output: Optimized for clean, minimal console output
MetaObjects Dynamic Framework provides runtime object construction, data management, persistence, and web integration capabilities built on top of the MetaObjects Core metadata framework.
- DataObject: Runtime object construction with type-safe property access
- ValueObject: Immutable value objects with builder patterns
- Managed Objects: Database-mapped objects with automatic CRUD operations
- ObjectManager (OM): Abstract persistence layer
- ObjectManagerDB (OMDB): SQL database persistence with automatic schema generation
- ObjectManagerNoSQL (OMNOSQL): NoSQL database support (MongoDB, etc.)
- MetaViews: Metadata-driven UI component generation
- Spring Integration: Full Spring Boot and Spring Web support
- REST APIs: Automatic REST controller generation
- FishStore Demo: Complete e-commerce application showcasing all features
MetaObjects Dynamic extends the core metadata framework with runtime capabilities:
MetaObjects Core (metadata framework)
↓ depends on
MetaObjects Dynamic (runtime objects)
↓ used by
Your Application (business logic)
<dependency>
<groupId>com.metaobjects</groupId>
<artifactId>metaobjects-dynamic-core</artifactId>
<version>6.2.6-SNAPSHOT</version>
</dependency>
<!-- For database persistence -->
<dependency>
<groupId>com.metaobjects</groupId>
<artifactId>metaobjects-omdb</artifactId>
<version>6.2.6-SNAPSHOT</version>
</dependency>
<!-- For web integration -->
<dependency>
<groupId>com.metaobjects</groupId>
<artifactId>metaobjects-web-spring</artifactId>
<version>6.2.6-SNAPSHOT</version>
</dependency>{
"metadata": {
"package": "com.example.model",
"children": [
{
"object": {
"name": "User",
"subType": "managed",
"children": [
{"field": {"name": "id", "subType": "long"}},
{"field": {"name": "name", "subType": "string", "@required": true}},
{"field": {"name": "email", "subType": "string", "@required": true}},
{"identity": {"name": "user_pk", "subType": "primary", "@fields": ["id"], "@generation": "increment"}}
]
}
}
]
}
}// Load metadata
MetaDataLoader loader = new FileMetaDataLoader();
loader.setSourceURIs(Arrays.asList(URI.create("classpath:metadata/model.json")));
loader.init();
// Get metadata for User
MetaObject userMeta = loader.getMetaObjectByName("User");
// Create a DataObject
DataObject user = new DataObject(userMeta);
user.setProperty("name", "John Doe");
user.setProperty("email", "john@example.com");
// Create a ValueObject (immutable)
ValueObject userValue = ValueObject.builder(userMeta)
.property("name", "Jane Doe")
.property("email", "jane@example.com")
.build();// Setup database persistence
ObjectManagerDB omdb = new ObjectManagerDB();
omdb.setDataSource(dataSource);
// Create database schema automatically
MetaClassDBValidatorService validator = new MetaClassDBValidatorService();
validator.setObjectManager(omdb);
validator.setAutoCreate(true);
validator.init();
// Save objects
ObjectConnection connection = omdb.getConnection();
omdb.createObject(connection, user);@RestController
@RequestMapping("/api/users")
public class UserController {
@Autowired
private ObjectManagerDB omdb;
@Autowired
private MetaDataLoader loader;
@GetMapping
public List<DataObject> getUsers() {
MetaObject userMeta = loader.getMetaObjectByName("User");
return omdb.getAllObjects(userMeta);
}
@PostMapping
public DataObject createUser(@RequestBody Map<String, Object> userData) {
MetaObject userMeta = loader.getMetaObjectByName("User");
DataObject user = new DataObject(userMeta);
userData.forEach(user::setProperty);
return omdb.createObject(user);
}
}| Module | Description | Key Classes |
|---|---|---|
| dynamic | Core dynamic object implementations | DataObject, ValueObject |
| om | Abstract object manager interface | ObjectManager, ObjectConnection |
| omdb | SQL database persistence | ObjectManagerDB, MetaClassDBValidator |
| omnosql | NoSQL database persistence | MongoDBManager, ColumnarManager |
| web | Web components and views | MetaView, TextView, FormView |
| web-spring | Spring framework integration | MetaDataAutoConfiguration |
| demo | FishStore demo application | Complete e-commerce example |
// Type-safe property access with validation
DataObject user = new DataObject(userMeta);
user.setStringProperty("name", "John Doe");
user.setLongProperty("id", 123L);
// Automatic validation based on metadata
user.setProperty("email", "invalid-email"); // Throws ValidationException// Automatic table creation from metadata
MetaClassDBValidatorService validator = new MetaClassDBValidatorService();
validator.setAutoCreate(true);
validator.init();
// Generates:
// CREATE TABLE users (
// id BIGINT AUTO_INCREMENT PRIMARY KEY,
// name VARCHAR(255) NOT NULL,
// email VARCHAR(255) NOT NULL
// );// Automatic form generation from metadata
MetaViewRenderer renderer = new MetaViewRenderer();
String formHtml = renderer.renderForm(userMeta, user);
// Generates HTML form with proper validation, labels, and input typesgit clone https://github.com/metaobjectsdev/metaobjects-dynamic.git
cd metaobjects-dynamic
mvn clean install- Clean Output: Minimal console output for better readability
- Fast Testing: Test output redirected to files for clean builds
- JaCoCo Coverage: Optimized to avoid system package instrumentation warnings
# Standard clean build (quiet output)
mvn clean install
# Verbose output for debugging
mvn clean install -X
# Quick build with even less output
mvn clean install -q- Java 17 or higher
- Maven 3.6 or higher
- MetaObjects Core 6.2.6+ (automatically resolved from Maven Central)
✅ Migration Complete: This project has been successfully migrated from the legacy core dependency structure to the updated MetaObjects Core 6.2.6+ framework. All modules are building and testing successfully.
If you need verbose logging for debugging:
# Delete the test logging configuration
rm src/test/resources/logback-test.xml
# Or change log levels in the file from WARN to DEBUGThe build is configured to exclude system packages. If you see warnings:
# These are normal and don't affect functionality:
# "WARNING: sun.misc.Unsafe::staticFieldBase has been called"If you encounter MetaData type registration problems:
- Ensure
CoreObjectsMetaDataProvideris properly registered - Check that
DataMetaObject.registerTypes()andValueMetaObject.registerTypes()are called - Verify service files in
META-INF/services/are intact
If OMDB tests fail with Derby driver issues:
<!-- Ensure all Derby artifacts are included -->
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyshared</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<scope>test</scope>
</dependency>- MetaObjects Core Documentation - Core metadata framework
- API Documentation - JavaDoc API reference
- User Guide - Comprehensive usage guide
- Examples - Code examples and tutorials
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for your changes
- Submit a pull request
- GitHub Issues: Report bugs or request features
- Documentation: Read the docs
- Community: Join our discussions
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- MetaObjects Core - Core metadata framework
- MetaObjects Examples - Additional examples and tutorials
MetaObjects Dynamic Framework - Bringing your metadata to life with runtime object construction and enterprise-grade persistence.