Michael Tissen

Results 13 comments of Michael Tissen

Thank you for the quick answer! Is there another way in the meantime?

I have the same problem: I have used your example BaseDao: ```cs import 'package:moor/moor.dart'; abstract class BaseDao extends DatabaseAccessor { final TableInfo _table; BaseDao(DB db, this._table) : super(db); Future insertOne(Insertable...

Thank you for your very fast reply! Your example seems promising. I will try it out with my other use-cases and see if still need the inheritance.

My next problem is on generic inserting: Code in my implemented Dao which i want to generalize: ```dart Future createEntryFromModel(UserEntity user) async { final version = await getCurrentEntityVersion(); final userWithUpdatedSyncStatus...

Thank you for your answer! I probably missed some important information for you :-) version is an `int` and SyncConstant.insert is a simple `string` I implemented your suggestion: ```dart Future...

Thanks! I will try it out.

Here is my implementation: ```dart Future insert(Insertable value) => into(_table).insert(value); Future insertEntityWithSyncStatus( Insertable entity, String syncStatus) async { final version = await getCurrentEntityVersion(); final columns = entity.toColumns(true); columns['sync_status'] = Variable(syncStatus);...

This is where the error occurs: ![grafik](https://user-images.githubusercontent.com/115047/90010606-67a58400-dca0-11ea-9c0c-034efe74826d.png) This is the function i forgot to post: ```dart /// Gives the highest version number in the entities table /// Returns the max-version...

Now its working!!! Thank you for your help. Possibly i make a documentation how to create a generic Dao-Baseclass for other people. I'll see :-)

Thank you very much for the fast and detailed answer!! We are using Target-Version "Windows 10 1803" and Min-Version "Windows 10 Fall Creators Update". ![grafik](https://user-images.githubusercontent.com/115047/178663042-94221c26-1a44-4942-9e57-63394322963c.png) and "Microsoft (R)-Build-Engine, Version 16.9.0+57"...