Issue Details (XML | Word | Printable)

Key: GROOVY-27
Type: Wish Wish
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Guillaume Laforge
Reporter: james strachan
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
groovy

Allow autogeneration of hashCode and equals for 'database' style objects

Created: 10/Oct/03 03:00 AM   Updated: 02/Nov/07 04:37 AM
Component/s: class generator
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
dependent
 


 Description  « Hide
Allow the identity metadata to specify primary keys for generation of hashCode & equals and other peristent stuff...

class Customer {
[identity name, foo]

int foo
Address* addresses
PhoneNumber+ numbers
String! name
Employee? employee
Date{d| assert d > 1000} dob
}



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Guillaume Laforge added a comment - 02/Nov/07 04:37 AM
The GORM layer in Grails offers a similar mechanism.
It's not in Groovy per-se, but one can easily reuse GORM standalone in Groovy.