Question: I have the following scenario:  

I'm having troubles figuring out what the owner side is and why ?
Please can you help ?

```
public class Basket
{

...

@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
    @JoinColumns({@JoinColumn(name="BASKET", referencedColumnName="ID")})   
    public Set<Product> getProductList() {
        return this.productList;
    }
}

public class Product
{

@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
    @JoinColumns({@JoinColumn(name="BASKET", referencedColumnName="ID")})
    public Basket getBasket() {
        return this.basket;
    }

}

```

Answer: 
This would work :

```
year_list<-as.numeric(substr(as.numeric(l),1,4))
month_list<-as.numeric(substr(as.numeric(l),5,6))

```

Example 1:

```
> l <- c(200101, 200102 ,200103, 200104)
> l
[1] 200101 200102 200103 200104

> year_list<-as.numeric(substr(as.numeric(l),1,4))
> year_list
[1] 2001 2001 2001 2001

> month_list<-as.numeric(substr(as.numeric(l),5,6))
> month_list
[1] 1 2 3 4

```

Example 2:

```
> l <- c(200701, 200802 ,200903, 201604)
> year_list<-as.numeric(substr(as.numeric(l),1,4))
> year_list
[1] 2007 2008 2009 2016
> month_list<-as.numeric(substr(as.numeric(l),5,6))
> month_list
[1] 1 2 3 4

```
You could do:

```
rbind(floor(l/100), l%%100)

#     [,1] [,2] [,3] [,4]
#[1,] 2001 2001 2001 2001
#[2,]    1    2    3    4

```