Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 03 2017 20:53
    tejainece opened #101
  • Jun 03 2017 20:52
    tejainece closed #100
  • Jun 03 2017 20:41
    tejainece synchronize #100
  • Jun 03 2017 20:15
    tejainece opened #100
  • Jun 03 2017 19:46

    tejainece on master

    Merge pull request #25 from Jag… Jaguar 0.5.x primary changes Big step towards 0.5.0 and 1 more (compare)

  • Jun 03 2017 19:46
    tejainece closed #99
  • Jun 03 2017 18:18
    tejainece opened #99
  • Mar 09 2017 18:38
    tejainece closed #98
  • Mar 09 2017 18:38
    tejainece commented #98
  • Mar 04 2017 08:39
    tejainece opened #98
  • Mar 03 2017 15:43
    tejainece closed #95
  • Mar 03 2017 15:43
    tejainece commented #95
  • Feb 28 2017 17:00
    lejard-h assigned #97
  • Feb 28 2017 17:00
    lejard-h assigned #96
  • Feb 28 2017 17:00
    lejard-h opened #97
  • Feb 28 2017 17:00
    lejard-h opened #96
  • Feb 28 2017 16:58
    lejard-h closed #90
  • Feb 28 2017 16:58
    lejard-h commented #90
  • Feb 27 2017 21:39

    Kleak on master

    Version bump Merge pull request #24 from Jag… Added glob route matching witho… and 2 more (compare)

  • Feb 27 2017 21:39
    Kleak closed #92
lewcianci
@lewcianci
Hi everyone :) trying to use this package on my flutter app because it looks great but am having some issues getting started...
The getting started guide says to do this after setting up the beans so the codegen can run: pub run build_runner build
i've found that i have to prefix that command with 'flutter' (so flutter pub run build_runner build) to get it to work...
but no code is generated...

this is the log of the command running
C:\code\MapManFlutter>flutter pub run build_runner build
[INFO] Generating build script...
[INFO] Generating build script completed, took 467ms

[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 119ms

[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 996ms

[INFO] Running build...
[INFO] Running build completed, took 17ms

[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 63ms

[INFO] Succeeded after 93ms with 0 outputs (0 actions)

lewcianci
@lewcianci
i worked it out
i was missing the 'part' statement up the top of my model that has the bean information in it
escamoteur
@escamoteur
Hi, I ran into trouble with jaguar_serializer
for two classses it throws exeptions although serializers do exists for the types
[SEVERE] JaguarCliException: Cannot handle TrackState in SampleJsonSerializer!
[SEVERE] #0      AnnotationParser._expandTypeInfo (package:jaguar_serializer_cli/src/instantiater/instantiater.dart:441:5)
#1      AnnotationParser.parse (package:jaguar_serializer_cli/src/instantiater/instantiater.dart:94:20)
#2      JaguarSerializerGenerator.generateForAnnotatedElement (package:jaguar_serializer_cli/src/generator.dart:34:65)
#3      GeneratorForAnnotation.generate (package:source_gen/src/generator_for_annotation.dart:47:30)
<asynchronous suspension>
#4      _generate (package:source_gen/src/builder.dart:280:35)
<asynchronous suspension>
#5      _Builder._generateForLibrary (package:source_gen/src/builder.dart:73:15)
<asynchronous suspension>
#6      _Builder.build (package:source_gen/src/builder.dart:67:11)
<asynchronous suspension>
#7      runBuilder.buildForInput (package:build/src/generate/run_builder.dart:45:21)
escamoteur
@escamoteur
ah ok it seems that the serializer can only handle direct imports of used types. importing a file that exports all types does not wotk
Ravi Teja Gudapati
@tejainece

ah ok it seems that the serializer can only handle direct imports of used types. importing a file that exports all types does not wotk

This should work. Can you please provide a simple reproducable repo. So I can fix this.

Jaumard
@jaumard

Is there an example somewhere on how to do a custom serializer ? Basically I want to manage a string enum like this:

class TxType {
  /// The underlying value of this enum member.
  final String value;

  const TxType._internal(this.value);

  static const TxType inject_ = const TxType._internal("inject");
  static const TxType transfer_ = const TxType._internal("transfer");
  static const TxType burn_ = const TxType._internal("burn");
  static const TxType delete_ = const TxType._internal("delete");
}

But I need to serialize/deserialize it correctly as from the backend it will be a simple String. Any ideas ?

Rob Halff
@rhalff
@jaumard here is an example:
class _StripBearerProcessor implements FieldProcessor<String, String> {
  const _StripBearerProcessor();
  @override
  String serialize(String value) => 'Bearer $value';

  @override
  String deserialize(String value) {
    return value.substring(7);
  }
}

@GenSerializer(
  fields: {
    'accessToken': Field(
      processor: _StripBearerProcessor(),
    ),
  },
)
class CustomerResponseSerializer extends Serializer<CustomerResponse>
    with _$CustomerResponseSerializer {}
Rob Halff
@rhalff
Examples seem to specify it as const EnDecode(processor: _StripBearerProcessor) instead of Field(processor: ...) though, not sure which one is more correct: https://github.com/Jaguar-dart/jaguar_serializer/wiki/Basics
Jaumard
@jaumard
Thanks @rhalff ! I’ve updated the openapi generator with that to handle enums OpenAPITools/openapi-generator#3654 :)
Jaumard
@jaumard
Anyone is able to do multipart request with jaguar_retrofit or resty ? Look like it’s broken Jaguar-dart/client#62
Jaumard
@jaumard
So to fix that I had to update my dependencies, but now I have a problem with jaguar_serializer_cli lol it tells me JaguarCliException: Cannot handle Uint8List in UserUpdateSerializer! I’ve bumped from 2.2.5 to 2.2.8 and there is nothing in the changelog.
Rob Halff
@rhalff
@jaumard I'm only looking at the code but probably it is because Uint8List is not detected as a built-in type?
But that wouldn't explain why it suddenly breaks, perhaps Uint8List was recently introduced somewhere within your own code?
Jaumard
@jaumard
No my code didn’t change between the two version it was always Uint8List, maybe something change in analyzer arround this and like you say it’s not a built in type… Only a guess ^^
Rob Halff
@rhalff
ah yes it's from the typed_data package.
Jaumard
@jaumard
I don’t think it’s buildIn method the problem, I suppose it’s isList that doesn’t recognize Uint8List as a List<int>
Rob Halff
@rhalff
what should it be serialized as though? In build_value there is a suggestion for base64 encoded in case of serializing to json: google/built_value.dart#194
you could solve that with a processor perhaps?
Jaumard
@jaumard
Uint8List is just a List<int> from what I understood :)
alkebuware
@alkebuware
What’s the best practice for sharing a model between the client and server when using Jaguar Server and Serializers? Ideally I’d have a single class and I could generate the Bean file in a server only project, while the serializers are shared between the server and client. However, I found it necessary to introduce jaguar_orm within the shared code to annotate the model for the bean generation, but that caused builds to fail with the client (browser) side code.
Michael Rockenschaub
@mikeroneer
Hey! Is it possible to have an entity containing a list of the same entity?
Vincent_Roehrig
@Park57
Hi ! I have a problem, when I use the method "getAll()" my object list gets full but it contains only null values, i don't understand why...
And in my Db the values are good
Vincent_Roehrig
@Park57
The method bean.find(1) return null too...
ISimplifyComplexity
@ISimplifyComplexity

I've got an issue where I have an entity called product groups, it has products. When I save the products and set their FK to catalog like so

 @BelongsTo(ProductGroupEntityBean)
  int productGroupId;

if I save the products group with cascade the products aren't saved. If I save them both with an insert they're saved but when I get the productGroups I get no products in the collection. It's almost as though the relationships aren't being specified correctly. Is the above right? Is this the correct way to declare a relationship?

ISimplifyComplexity
@ISimplifyComplexity
here's what the generated create function looks like:
  Future<void> createTable({bool ifNotExists = false}) async {
    final st = Sql.create(tableName, ifNotExists: ifNotExists);
    st.addInt(id.name, primary: true, isNullable: false);
    st.addStr(name.name, isNullable: false);
    st.addInt(productCatalogId.name,
        foreignTable: productCatalogEntityBean.tableName,
        foreignCol: productCatalogEntityBean.id.name,
        isNullable: false);
    return adapter.createTable(st);
ISimplifyComplexity
@ISimplifyComplexity
Ah I think it might be that I needed to call "preloadAll"
ISimplifyComplexity
@ISimplifyComplexity
also needed to set the cascade flag to true
ISimplifyComplexity
@ISimplifyComplexity
So I have a new question this morning. Does Jaguar ORM support blob storage for image files?