
sona11
In Couchbase, how do you change the datatype of an attribute from String to Array?
I’m having a difficulty. I want to modify an attribute’s data type from String to Array.
{
“id”: “trn:tarb:tradingpartner:uuid:00000464-fa72-49fe-b050-c4bf1cfd8259”,
“partnerNumber”: “1098981”,
“partnerName”: "AFLO ",
“currencyCode”: “GBP”,
“commercialPartnerStatus”: “Inactive”,
“source”: {
“id”: “STV0001$$”,
“name”: “QS”
},
“corpCode”: “DR”,
“subCorpCode”: “001”,
“targetMarket”: “UK”
}
In the preceding one, I want to convert targetMarket from String to Array without affecting its name.
“targetMarket”:[
“UK”,
“IN”
]
The issue is with the old data, which is in string format, and if I alter the attribute in java, I receive an error while retrieving data from the database. It cannot automatically cast from string to arrayList. As a result, I must first modify the old data before changing the java code. It’s good with me if the data is null or erased after transforming the object from string to array.
Popular Backend topics

Cross posting from HashNode.
A friend of mine is creating Uber-like app for a small company with 200 to 1000 cars. The app will operate ...
New

Is there somewhere a good introduction to rust for experienced programmers (with years of C++/C#/Java experience)?
Wanted to give it a t...
New

I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New

Hey everybody!
I’m working on the project that includes import of Oracle data to PostgreSQL. That data comes as Oracle export (expdp) fi...
New

I’ve been working on and rewriting my messaging platform several times for the past two years. With Discords new rebranding, it has reall...
New

I have this code in a file that’s used to … render templates.
require 'erb'
require 'ostruct'
MISSING_CONFIG_MARKER = :config_key_and_v...
New

If when trying to create (or recreate) your dev db with rails db:create you are getting:
PG::ConnectionBad: connection to server on soc...
New

In C, how they are different?
char str[] = "xyz"; // statement
//and
char str[4] = "xyz"; // statement
The first, i...
New

Background
When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error:
* assembling mark...
New

Background
I have an umbrella app where I use a dependecy called ETS. This dependency has a type called set_options that I use in some of...
New
Other popular topics

Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face:
Perhaps if there’s enough peop...
New

You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New

Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face:
https://on...
New

In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first:
asdf plugin-upd...
New

“A Mystical Experience” Hero’s Journey with Paolo Perrotta @nusco
Ever wonder how authoring books compares to writing articles?...
New

Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New

API 4
Path:
/user/following/
Method:
GET
Description:
Returns the list of all names of people whom the user follows
Response
[
{ ...
New

Author Spotlight
James Stanier
@jstanier
James Stanier, author of Effective Remote Work , discusses how to rethink the office as we e...
New

If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol:
bre...
New

Author Spotlight
Dmitry Zinoviev
@aqsaqal
Today we’re putting our spotlight on Dmitry Zinoviev, author of Data Science Essentials in ...
New
Latest in Java
Backend>Questions
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /ash
- /vscode
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /zig
- /scala
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /textmate
- /react-native
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /django
- /spring
- /diversity
- /nodejs
- /lua
- /c
- /julia
- /slackware
- /neovim