-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: <PostGres> #1178
Comments
The error is that there does not exist the column Utilizador_ID |
Can you share the exact error you are encountering? |
I have gave up on PostGres. By the way how can i map to a readonly property that is a calculated column in sql server? |
Does the information in our limitation page answer your question? It is only supported for reading, not writing. |
It responds to my question. Very bad decision on RepoDB side to remove the IgnoreAttribute or something like Dapper Thanks. All those Issues not Closed makes the project look dead or abandoned. |
Yeah I wish RepoDb had an ignore attribute, but it does allow you to explicitly specify the fields which we use to implement our own ignore attribute logic in our repository layer… We manually filtering out properties that are ignored and for valid properties we look up any |
Hey, sure, we can resume the IgnoreAttribute on the library if this is really necessary. |
I think that a option like [Computed] or [ReadOnly] world be easy to impletent and ignore on update or insert comand and it wold make much more sence to the users of the library. |
[ReadOnly] wouldn’t make as much sense and not all field use cases are “Computed” … other libraries use [Transient] but I’ve never been a big fan as it’s a bit abstract… |
@mikependon yes there are use cases where the automatic behavior used by RepoDb isn’t suitable… we have legacy models (horribly designed that we inherited) that had naming conflicts with underlying tables but we couldn’t change the names due to tight coupling with the front end, etc. So by applying our own field filtering and generating our own list of field names we alleviated this allowing us to migrate from the old (really bad & proprietary) ORM to RepoDb. |
I understand the intent and I also agreed that 2 separate attributes might be overkill. I am initially thinking of just reverting the IgnoreAttribute...
and also support it on FluentMapper.
In which the Thoughts? |
I think that his way solves all problems. |
For an Attribute it works fine. But to be honest the In/Out semantics are a bit esoteric and not nearly as clear as Read/Write (for Delete, Create/Insert, Update) semantics for the enum would be. But in any case the default should be Both or Ignore.ReadAndWrite to simplify the most common use case. So personally I think the following would be more intuitive for most:
|
@cajuncoding your comments and naming convention proposal make sense. It is good to go with that. |
I have this Code:
[Map("Utilizador_ID")]
public Guid UtilizadorID { get; set; }
It Works in MsSql server but in PostGresSQL ir gives the error
The text was updated successfully, but these errors were encountered: