Question: I'm trying to delete some BlRelation in my database using hibernate. 

Unfortunately the query does not work. Could you please help me on this ? I know it should be quite straightforward ...

```
delete r FROM BlRelation where r.elementId.blProvider.providerId = 1

```

Thanks !

Answer: 
For your filenames you should use

```
NSString *tmpFileNameRandom = [[NSString alloc] initWithFormat:@"Sound%02d", randomNumber];

```

this will give you leading zeros with numbers < 10...

or better yet, try this:

```
int randomNumber = arc4random() % 24 + 1;

NSURL *soundURL = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:[NSString stringWithFormat:@"Sound%02d", randomNumber] ofType:@"mp3"]];

AVAudioPlayer * soundPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundURL error:nil];

[soundPlayer prepareToPlay];
[soundPlayer play];

```
Have you added the AVFoundation framework to your project? AVAudioPlayer is a class of this framework.

To add this framework (in Xcode 4), select your project file, select the 'Summary' tab and add it by clicking on the + below the "Linked frameworks and libraries" tableview.