This commit is contained in:
Julius Haertl
2016-06-15 14:05:19 +02:00
parent ae9d5da329
commit cf3bbcb888
35 changed files with 686 additions and 465 deletions

View File

@@ -2,14 +2,18 @@
namespace OCA\Deck\Db;
use OCP\AppFramework\Db\Entity;
use OCP\IDb;
use OCP\AppFramework\Db\Mapper;
class StackMapper extends Mapper {
public function __construct(IDb $db) {
private $cardMapper;
public function __construct(IDb $db, CardMapper $cardMapper) {
parent::__construct($db, 'deck_stacks', '\OCA\Deck\Db\Stack');
$this->cardMapper = $cardMapper;
}
@@ -29,5 +33,8 @@ class StackMapper extends Mapper {
return $this->findEntities($sql, [$boardId], $limit, $offset);
}
public function delete(Entity $entity) {
// FIXME: delete linked elements, because owncloud doesn't support foreign keys for apps
return parent::delete($entity);
}
}