Fixed and new snapshot deployed.
Thank you again for finding this bug.
/Patrik


Patrik Nordwall wrote:
> 
> Thanks, I will fix that.
> /Patrik
> 
> tp218 wrote:
>> 
>> 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---tp26566579s17564p26599035.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to