Question: I have a device that requires having 3 partitions on its SD card. The first and third are the typical boot and rootfs partitions while the second just needs to be blank space. I'm using the Fido branch of OpenEmbedded oe-core and meta-oe as well as 1.26 of Bitbake. My kickstart file looks like this:

```
part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16
part swap --ondisk mmcblk --fstype=ext4 --align 4 --size 100
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4 --size 2000

```

I use `dd` to write the `.direct` file to my SD card (8 GB) using the `bs=1M` option. The resulting partition table ends up being corrupt in some way. I've everything from bad superblocks to incorrect sizes of the partitions and other oddities in gParted like, `cannot initialize '::'`.

If I remove the second partition, everything is fine. I'm seeing conflicting posts/bug reports indicating that this both is and is not supported.

Has anyone been able to create multiple partitions with wic?

Answer: 
Your code produces query with an `INNER JOIN`, but you need a `LEFT JOIN`, so query with:

```
includes(:tags).references(:tags).where( # the remaining of your query

```

or write a join statement yourself:

```
joins("LEFT JOIN tags ON tags.id=...") # incomplete

```
This is because you are using joins in your search query. As a result of that it generates an **inner join** these joins expect related data to exist on both tables. So, if you don't have any tags it won't be returned by this code. If you want both tagged and untagged data then, you could rather use an includes statement as follows.

```
def self.search(search)
  includes(:tags)
  .where("title LIKE :search OR content LIKE :search OR tags.name LIKE :search", search: "%#{search}%")
end

```