artmapper
Version:
Spring Boot clone for Node.js with TypeScript/JavaScript - JPA-like ORM, Lombok decorators, dependency injection, and MySQL support
168 lines (133 loc) • 7.25 kB
Markdown
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.0.14] - 2025-11-24
### Changed
- Removed debug logging from EntityManager
## [1.0.13] - 2025-11-24
### Fixed
- Fixed UPDATE operations not updating data - now only updates fields explicitly provided
- Added `fieldsToUpdate` parameter to `persist()` and `save()` methods for partial updates
- Fixed SQL quoting in UPDATE statements (added backticks around table and column names)
### Changed
- `Repository.save()` and `EntityManager.persist()` now accept optional `fieldsToUpdate` parameter
- When `fieldsToUpdate` is provided, only those fields are updated in the database
## [1.0.12] - 2025-11-24
### Fixed
- Fixed UPDATE operations being treated as INSERT - now correctly detects when entity has an ID
- Fixed duplicate entry error on UPDATE - entities with AUTO_INCREMENT IDs now properly update instead of inserting
## [1.0.11] - 2025-11-24
### Fixed
- Simplified undefined field filtering - now only includes fields explicitly provided in request
- Database defaults are now handled by MySQL instead of being included in INSERT statements
## [1.0.10] - 2025-11-24
### Fixed
- Fixed syntax error in SpringApplication route handler
- Fixed EntityManager to skip undefined fields - only includes fields that are actually provided in the request
- Fixed UPDATE statements to only update fields that are explicitly set (not undefined)
- Fixed INSERT statements to only include fields that are provided or have default values
### Changed
- EntityManager now intelligently filters columns based on what's actually set on the entity
- UPDATE operations only modify fields that are explicitly provided
- INSERT operations skip undefined fields (unless they have database defaults)
## [1.0.9] - 2025-11-24
### Fixed
- Fixed SQL syntax error in INSERT statements - removed invalid multiple statement syntax
- Fixed AUTO_INCREMENT ID column being included in INSERT statements - now properly excluded
- Fixed LAST_INSERT_ID() retrieval - now uses result.insertId instead of separate SELECT query
- Improved INSERT statement generation to exclude ID column when AUTO_INCREMENT is used
## [1.0.8] - 2025-11-24
### Fixed
- Fixed POST/PUT/PATCH request body parsing - routes now correctly receive request body data
- Fixed route path normalization for all HTTP methods (GET, POST, PUT, DELETE, PATCH)
- Fixed empty route path handling (`''` paths) - now properly normalized
- Fixed null response handling - GET requests returning null now return 404 status
- Fixed trailing slash handling in route paths
- Fixed MySQL bind parameter error - undefined values are now converted to null for MySQL compatibility
- Fixed EntityManager to handle undefined entity properties correctly
- Fixed QueryBuilder to convert undefined parameters to null in WHERE clauses
### Changed
- Improved body parser configuration with 10mb limit for large payloads
- Enhanced route registration with better path normalization
- Added comprehensive route registration logging for debugging
- Improved error handling and logging for request body parsing issues
- Better error messages for debugging route and handler issues
### Added
- Route registration logging to help debug route setup issues
- Body parsing warnings when request body is empty
- Handler error logging for better debugging
## [1.0.7] - 2025-11-24
### Fixed
- Fixed SQL schema generation for ENUM and SET types - now correctly includes enum values
- Fixed DEFAULT CURRENT_TIMESTAMP handling - removed quotes for proper MySQL syntax
- Fixed Column decorator to store all ColumnOptions properties (enum, unsigned, onUpdate, etc.)
- Fixed route handler parameter metadata retrieval - now correctly reads from class prototype instead of instance
- Fixed TypeScript parameter decorators (@RequestParam, @PathVariable, @RequestBody) not working in controllers
### Changed
- Improved route registration to properly handle parameter decorators in TypeScript
- Enhanced SchemaGenerator to pass all column options to SQL type generation
## [1.0.6] - 2025-11-24
### Added
- Full MySQL data type support including:
- ENUM types with custom values
- BOOLEAN/BOOL types (mapped to TINYINT(1))
- SET types with custom values
- All integer types (INT, BIGINT, SMALLINT, TINYINT, MEDIUMINT) with UNSIGNED support
- All floating point types (FLOAT, DOUBLE, DECIMAL, NUMERIC) with precision/scale
- All text types (TEXT, LONGTEXT, MEDIUMTEXT, TINYTEXT)
- All BLOB types (BLOB, LONGBLOB, MEDIUMBLOB, TINYBLOB)
- Binary types (BINARY, VARBINARY)
- Date/Time types with fractional seconds (DATE, TIME, DATETIME, TIMESTAMP, YEAR)
- JSON type
- BIT type
- Geometry types (GEOMETRY, POINT, LINESTRING, POLYGON, etc.)
- Enhanced ColumnOptions with:
- `enum` - Array of enum values
- `unsigned` - For numeric types
- `zerofill` - For numeric types
- `autoIncrement` - Auto increment flag
- `comment` - Column comment
- `charset` - Character set
- `collate` - Collation
- `onUpdate` - ON UPDATE clause
- Example Product entity demonstrating all data types
## [1.0.5] - 2025-11-24
### Added
- Enhanced TypeScript configuration with comprehensive compiler options
- Added `jsconfig.json` for JavaScript project support
- Improved module resolution and path mapping
- Better support for mixed TypeScript/JavaScript projects
### Changed
- Updated `tsconfig.json` with detailed configuration for both TypeScript and JavaScript
- Enhanced build configuration for better IDE support
## [1.0.4] - 2025-11-24
### Added
- Initial npm publication
- Complete documentation (API, Getting Started, Advanced)
- GitHub repository setup
## [1.0.0] - 2025-11-24
### Added
- Initial release of Spring Boot TS
- JPA-like entity decorators (`@Entity`, `@Table`, `@Column`, `@Id`, `@GeneratedValue`)
- Advanced mapping decorators (`@JoinColumn`, `@JoinTable`, `@MappedSuperclass`, `@Embedded`, `@Transient`, `@Enumerated`, `@Temporal`)
- Relationship decorators (`@OneToMany`, `@ManyToOne`, `@ManyToMany`, `@OneToOne`)
- EntityManager with CRUD operations
- Repository pattern with BaseRepository
- RelationshipManager for loading relationships
- Dependency injection container with `@Service`, `@Controller`, `@Component`, `@Repository`
- Lombok-style decorators (`@Data`, `@Getter`, `@Setter`, `@Builder`, `@ToString`, `@EqualsAndHashCode`)
- RESTful web framework with `@GetMapping`, `@PostMapping`, `@PutMapping`, `@DeleteMapping`
- MySQL integration with connection pooling
- Auto schema generation from entity metadata
- Query builder for custom queries
- Full TypeScript and JavaScript support
- Express.js integration
- Comprehensive documentation and examples
### Features
- Automatic database and table creation
- EAGER/LAZY relationship loading
- Parameter injection in controllers
- Configuration value injection
- Type-safe queries
- Transaction support ready