aqueduct icon indicating copy to clipboard operation
aqueduct copied to clipboard

Annotation @ManagedTableAttributes: Is not working.

Open marciotrix77 opened this issue 4 years ago • 1 comments

I am trying to use the @ManagedTableAttributes annotation to define two properties of a table as unique, but Aqueduct is not recognizing this annotation.

Error Mensagem: "Undefined name 'ManagedTableAttributes' used as an annotation.Try defining the name or importing it from another library."

I am using Aqueduct version ^ 3.3.0 + 1 and dart sdk version 2.10.5.

My code:

`import 'package:agclinic/model/functionality.dart'; import 'package:agclinic/model/perfil.dart';

import '../agclinic.dart';

class ProfileFunctionality extends ManagedObject<_ProfileFunctionality> implements _ProfileFunctionality{

}

@ManagedTableAttributes(uniquePropertySet: const [#profile, #functionality]) class _ProfileFunctionalitye{

@primaryKey int id;

@Relate(#profileFunctionality) Profile profile;

@Relate(#profileFunctionality) Functionality functionality;

}`

marciotrix77 avatar Mar 14 '21 19:03 marciotrix77

There is no such an anotation. What you need to use is @Table(...);

Reductions avatar Mar 15 '21 09:03 Reductions