Question: I often extend my Entities in BreezeJS using the below syntax:

```
var Employee = function () {
this.FirstName = ko.observable(""); // default FirstName
this.LastName = ko.observable("");  // default LastName
this.fullName = ko.computed(
        function () {
            return this.FirstName() + " " + this.LastName();
        }, this);

```

};

```
manager.metadataStore.registerEntityTypeCtor("Employee", Employee);

```

When I do this inline (in the same script) it works as expected. When I move the Employee definition to it's own Require.JS module, the prototype changes from 

```
{}

```

to

```
{ __moduleId__ : 'Employee' }

```

BreezeJS chokes on this, and gives a :

```
TypeError: cannot call "bind" of undefined.

```

I've created a bandaid fix by this by assigning Employee.prototype = {} before the registration of the constructor, but I feel this isn't the best approach. 

Is it possible to override Require.JS's modification of the module's prototype, or is it possible to make Breeze.JS play nicely with this extra bit of code?

Alternatively, I've considered nesting my object so I'd do something like:

```
manager.metadataStore.registerEntityTypeCtor("Employee", Employee.modelCtor);

```

Though that also feels clumsy to me. Thoughts?

Answer: 
The easiest on the long term is to use one of the official Vertica UDFs to be found on github at <https://github.com/vertica/Vertica-Extension-Packages/tree/master/strings_package> which provides a group\_concat function. The installation procedure is to found in the README, and examples are even provided.
Have look at Concatenate UDAF in vertica examples which comes with vertica installation
that's the mysql equivalent. you can just directly install it.

more /opt/vertica/sdk/examples/AggregateFunctions/Concatenate.cpp

```
-- Shell comppile
cd /opt/vertica/sdk/examples/AggregateFunctions/
g++ -D HAVE_LONG_INT_64 -I /opt/vertica/sdk/include -Wall -shared -Wno-unused-value \
-fPIC -o Concatenate.so Concatenate.cpp /opt/vertica/sdk/include/Vertica.cpp

-- Create LIBRARY
CREATE LIBRARY AggregateFunctionsConcatenate AS '/opt/vertica/sdk/examples/AggregateFunctions/Concatenate.so';
CREATE AGGREGATE FUNCTION agg_group_concat AS LANGUAGE 'C++' NAME 'ConcatenateFactory' LIBRARY AggregateFunctionsConcatenate;

in the Concatenate.cpp
replace : input_len*10
with : 65000

```

there is two place you have to replace this value in the code.

65000 is the max length you can get with varchar. and since vertica doesnt uses all of 65000 for the values smaller than 65000 character you are fine.