Hi all.
I'm using latest Sculptor-1.7.0-SNAPSHOT and perhaps I'm wrong, but the
findByKey-Method does not seem to work correctly, if there is a
to-One-Relation involved.
- I have two entities A and B
- B has a string key, A has a composize key of a string and a reference to B
Entity A {
String a key
- @B bRef key
}
Service AService {
findByKey => ARepository.findByKey;
save => ARepository.save;
}
Entity B {
String b key
}
If i insert B and A and do a findByKey on A with a key which definitely does
not exist, the method does not throw the defined ANotFoundException.
B b = bService.save(context, new B("b"));
A a = aService.save(context, new A("a", b));
try {
aService.findByKey(context, "XXXXX", b);
// This should never happen
System.out.println("NOT OK - Found non existing entity");
} catch (ANotFoundException e) {
System.out.println("OK - Could not find entity");
}
Is this a bug or am doing something wrong regarding the composite keys?
Greetings
TP
--
View this message in context:
http://old.nabble.com/Bug-in-findByKey-with-key-including-to-One-Relation---tp26566579s17564p26566579.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer