http://www.fornax-platform.org/tracker/browse/CSC-249
is fixed in trunk. Now it is possible to combine attributes, basic types,
enum and simple to-one references in a composite natural key.
Sample:
Entity Person {
scaffold
Date birthDate key
- @Gender sex key
- @Ssn ssn key
- @PersonName name key
Repository PersonRepository {
List<@Person> findPersonByName(String name) => AccessObject;
save;
save(Collection<@Person> entities);
findByQuery;
findByExample;
findByKeys;
}
}
BasicType Ssn {
String number key length="20"
- @Country country key
}
BasicType PersonName {
String first key
String last key
}
enum Gender {
FEMALE("F"),
MALE("M")
}
enum Country {
String alpha2 key
String alpha3
int numeric
SWEDEN("SE", "SWE", "752"),
NORWAY("NO", "NOR", "578"),
DENMARK("DK", "DNK", "208"),
US("US", "USA", "840")
}
--
View this message in context:
http://www.nabble.com/Natural-key-reference-tp21952643s17564p22150701.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer