* fix(query): fix missing unique field in query builder template
when a query gets cloned the unique field doesn't get cloned
#2331
* fix(query): added missing go generate ./...
#2331
* fix(query): added missing go generate ./...
#2331
The new Alias option adds package aliases (local names) for all type-packages that
their import identifier conflicts with user-defined packages (i.e. GoType).
* fix: update only/onlyID comments
this patch updates the Only/OnlyID methods in the builder template from:
> // Returns a *NotSingularError when exactly one {{ $.Name }} entity is not found.
to
> // Returns a *NotSingularError when more than exactly one {{ $.Name }} ID is found.
in an effort to be more explicit in the explanation of the behavior of the methods.
* fix: update wording to be more concise from suggestion
Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>
* fix: update Only wording to be more concicse
* fix: generate new files
Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>
Trying to add tests to some extensions and this is complicating things a lot because `Field.def` is unexported. Not taking the length of `def.Enums` but `Enums` directly fixes this. It technically is also more correct, because `f.Enums` could be greater than `f.def.Enums`.
* Fix entql generation for ID types of Bytes, etc.
I was running into an issue trying to use a Bytes fieldas the ID field in a Schema, and it appears there is an currently an issue with using a Bytes field as the ID field in the entql codegen (it was outputing a function . I belive this should fix it (I tested this by adding the entql flag to the custom id integration test). I wasn't sure if the other cases I added (e.g. an ID field that is json type / time type / etc.) are actually sane ID field types, but if those don't make any sense I can remove some of those from the added conditionals.
* remove redundant line
Also, for some reason, the TimeMixin.UpdateTime was an immutable field,
but this was incorrent, because the codegen just skip generating
update setters to it. Removing the Immutable modifier allows users
to set this field explicitly.
* schema/field:add UpdateDefault to numeric (#1718)
* schema/field:fix comment
* schema/field: change interface to self type with DefaultFunc/UpdateDefault
* schema/field: change interface to self type with DefaultFunc/UpdateDefault
* schema/field: change interface to self type with DefaultFunc/UpdateDefault
* schema/field: add support for setting update default funcs to numeric fields
Co-authored-by: godcong <jumbycc@163.com>