Escape character in table dataset

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Escape character in table dataset

Gregory Orciuch
Hi,

I do have a trouble with one of tables which was named SET. Regardless the idiot in my company who wanted this name :/

So we do have it defined in JPA2/Hibernate as below:
@Table(schema = "media", name = "[set]")
public class Set {...}

(because it wants to work with MS SQL Server, where obviously SET is a reserved word).
(changing name="set" causes hibernate not to find the table on MS SQL side).

Then I do run same JPA entity in the integration tests with H2, and it is created with statement:
Hibernate: create table media."set" (id integer....)

At the end I want to load a dataset using DBUnit to this H2, so within dataset I do have
<....>
<MEDIA.set id="1" bla="ssss"/>

However it fails to load because of exception:
org.dbunit.dataset.NoSuchTableException: MEDIA.SET

Currently I do not have an option to refactor table name. so it has to stay [set] in JPA entity.

When I write a dataset like <MEDIA."set" ... it complains about the " character.

Any idea how to load data in this crappy situation ?

BR,
Gregory


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Escape character in table dataset

Jeff Jensen-2
Is the schema set correctly for the test?  What happens (the errror or success) when removing "MEDIA." from the xml dataset?


On Wed, Jun 1, 2016 at 10:05 AM, Gregory Orciuch <[hidden email]> wrote:
Hi,

I do have a trouble with one of tables which was named SET. Regardless the idiot in my company who wanted this name :/

So we do have it defined in JPA2/Hibernate as below:
@Table(schema = "media", name = "[set]")
public class Set {...}

(because it wants to work with MS SQL Server, where obviously SET is a reserved word).
(changing name="set" causes hibernate not to find the table on MS SQL side).

Then I do run same JPA entity in the integration tests with H2, and it is created with statement:
Hibernate: create table media."set" (id integer....)

At the end I want to load a dataset using DBUnit to this H2, so within dataset I do have
<....>
<MEDIA.set id="1" bla="ssss"/>

However it fails to load because of exception:
org.dbunit.dataset.NoSuchTableException: MEDIA.SET

Currently I do not have an option to refactor table name. so it has to stay [set] in JPA entity.

When I write a dataset like <MEDIA."set" ... it complains about the " character.

Any idea how to load data in this crappy situation ?

BR,
Gregory


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Escape character in table dataset

Gregory Orciuch
Yeap, Schema is correct, other MEDIA.* object are fine, means table created by JPA within H2 and data loaded from dbunit.

2016-06-01 17:17 GMT+02:00 Jeff Jensen <[hidden email]>:
Is the schema set correctly for the test?  What happens (the errror or success) when removing "MEDIA." from the xml dataset?


On Wed, Jun 1, 2016 at 10:05 AM, Gregory Orciuch <[hidden email]> wrote:
Hi,

I do have a trouble with one of tables which was named SET. Regardless the idiot in my company who wanted this name :/

So we do have it defined in JPA2/Hibernate as below:
@Table(schema = "media", name = "[set]")
public class Set {...}

(because it wants to work with MS SQL Server, where obviously SET is a reserved word).
(changing name="set" causes hibernate not to find the table on MS SQL side).

Then I do run same JPA entity in the integration tests with H2, and it is created with statement:
Hibernate: create table media."set" (id integer....)

At the end I want to load a dataset using DBUnit to this H2, so within dataset I do have
<....>
<MEDIA.set id="1" bla="ssss"/>

However it fails to load because of exception:
org.dbunit.dataset.NoSuchTableException: MEDIA.SET

Currently I do not have an option to refactor table name. so it has to stay [set] in JPA entity.

When I write a dataset like <MEDIA."set" ... it complains about the " character.

Any idea how to load data in this crappy situation ?

BR,
Gregory


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Escape character in table dataset

Gregory Orciuch
and I cannot remove the MEDIA. , because the same retard as I mention at the begining named few tables same but have different schema (or catalog).
I do have like MEDIA.TYPE  and PRODUCT.TYPE

2016-06-01 17:21 GMT+02:00 Gregory Orciuch <[hidden email]>:
Yeap, Schema is correct, other MEDIA.* object are fine, means table created by JPA within H2 and data loaded from dbunit.

2016-06-01 17:17 GMT+02:00 Jeff Jensen <[hidden email]>:
Is the schema set correctly for the test?  What happens (the errror or success) when removing "MEDIA." from the xml dataset?


On Wed, Jun 1, 2016 at 10:05 AM, Gregory Orciuch <[hidden email]> wrote:
Hi,

I do have a trouble with one of tables which was named SET. Regardless the idiot in my company who wanted this name :/

So we do have it defined in JPA2/Hibernate as below:
@Table(schema = "media", name = "[set]")
public class Set {...}

(because it wants to work with MS SQL Server, where obviously SET is a reserved word).
(changing name="set" causes hibernate not to find the table on MS SQL side).

Then I do run same JPA entity in the integration tests with H2, and it is created with statement:
Hibernate: create table media."set" (id integer....)

At the end I want to load a dataset using DBUnit to this H2, so within dataset I do have
<....>
<MEDIA.set id="1" bla="ssss"/>

However it fails to load because of exception:
org.dbunit.dataset.NoSuchTableException: MEDIA.SET

Currently I do not have an option to refactor table name. so it has to stay [set] in JPA entity.

When I write a dataset like <MEDIA."set" ... it complains about the " character.

Any idea how to load data in this crappy situation ?

BR,
Gregory


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user




------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Escape character in table dataset

Jeff Jensen-2
Does escape pattern help you?  "Allows schema, table and column names escaping."


On Wed, Jun 1, 2016 at 10:23 AM, Gregory Orciuch <[hidden email]> wrote:
and I cannot remove the MEDIA. , because the same retard as I mention at the begining named few tables same but have different schema (or catalog).
I do have like MEDIA.TYPE  and PRODUCT.TYPE

2016-06-01 17:21 GMT+02:00 Gregory Orciuch <[hidden email]>:
Yeap, Schema is correct, other MEDIA.* object are fine, means table created by JPA within H2 and data loaded from dbunit.

2016-06-01 17:17 GMT+02:00 Jeff Jensen <[hidden email]>:
Is the schema set correctly for the test?  What happens (the errror or success) when removing "MEDIA." from the xml dataset?


On Wed, Jun 1, 2016 at 10:05 AM, Gregory Orciuch <[hidden email]> wrote:
Hi,

I do have a trouble with one of tables which was named SET. Regardless the idiot in my company who wanted this name :/

So we do have it defined in JPA2/Hibernate as below:
@Table(schema = "media", name = "[set]")
public class Set {...}

(because it wants to work with MS SQL Server, where obviously SET is a reserved word).
(changing name="set" causes hibernate not to find the table on MS SQL side).

Then I do run same JPA entity in the integration tests with H2, and it is created with statement:
Hibernate: create table media."set" (id integer....)

At the end I want to load a dataset using DBUnit to this H2, so within dataset I do have
<....>
<MEDIA.set id="1" bla="ssss"/>

However it fails to load because of exception:
org.dbunit.dataset.NoSuchTableException: MEDIA.SET

Currently I do not have an option to refactor table name. so it has to stay [set] in JPA entity.

When I write a dataset like <MEDIA."set" ... it complains about the " character.

Any idea how to load data in this crappy situation ?

BR,
Gregory


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user




------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Escape character in table dataset

Gregory Orciuch

Nope becuase it does not escape the table name after dot. Looks like MEDIA.SET as whole is escaped not each part between dot.

1 cze 2016 17:33 "Jeff Jensen" <[hidden email]> napisał(a):
Does escape pattern help you?  "Allows schema, table and column names escaping."


On Wed, Jun 1, 2016 at 10:23 AM, Gregory Orciuch <[hidden email]> wrote:
and I cannot remove the MEDIA. , because the same retard as I mention at the begining named few tables same but have different schema (or catalog).
I do have like MEDIA.TYPE  and PRODUCT.TYPE

2016-06-01 17:21 GMT+02:00 Gregory Orciuch <[hidden email]>:
Yeap, Schema is correct, other MEDIA.* object are fine, means table created by JPA within H2 and data loaded from dbunit.

2016-06-01 17:17 GMT+02:00 Jeff Jensen <[hidden email]>:
Is the schema set correctly for the test?  What happens (the errror or success) when removing "MEDIA." from the xml dataset?


On Wed, Jun 1, 2016 at 10:05 AM, Gregory Orciuch <[hidden email]> wrote:
Hi,

I do have a trouble with one of tables which was named SET. Regardless the idiot in my company who wanted this name :/

So we do have it defined in JPA2/Hibernate as below:
@Table(schema = "media", name = "[set]")
public class Set {...}

(because it wants to work with MS SQL Server, where obviously SET is a reserved word).
(changing name="set" causes hibernate not to find the table on MS SQL side).

Then I do run same JPA entity in the integration tests with H2, and it is created with statement:
Hibernate: create table media."set" (id integer....)

At the end I want to load a dataset using DBUnit to this H2, so within dataset I do have
<....>
<MEDIA.set id="1" bla="ssss"/>

However it fails to load because of exception:
org.dbunit.dataset.NoSuchTableException: MEDIA.SET

Currently I do not have an option to refactor table name. so it has to stay [set] in JPA entity.

When I write a dataset like <MEDIA."set" ... it complains about the " character.

Any idea how to load data in this crappy situation ?

BR,
Gregory


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user




------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Escape character in table dataset

LAW Andy
Single quotes rather than double?

MEDIA.’SET’ ??


> On 1 Jun 2016, at 16:35, Gregory Orciuch <[hidden email]> wrote:
>
> Nope becuase it does not escape the table name after dot. Looks like MEDIA.SET as whole is escaped not each part between dot.
>
> 1 cze 2016 17:33 "Jeff Jensen" <[hidden email]> napisał(a):
> Does escape pattern help you?  "Allows schema, table and column names escaping."
> http://dbunit.sourceforge.net/properties.html#escapepattern
>
>
> On Wed, Jun 1, 2016 at 10:23 AM, Gregory Orciuch <[hidden email]> wrote:
> and I cannot remove the MEDIA. , because the same retard as I mention at the begining named few tables same but have different schema (or catalog).
> I do have like MEDIA.TYPE  and PRODUCT.TYPE
>
> 2016-06-01 17:21 GMT+02:00 Gregory Orciuch <[hidden email]>:
> Yeap, Schema is correct, other MEDIA.* object are fine, means table created by JPA within H2 and data loaded from dbunit.
>
> 2016-06-01 17:17 GMT+02:00 Jeff Jensen <[hidden email]>:
> Is the schema set correctly for the test?  What happens (the errror or success) when removing "MEDIA." from the xml dataset?
>
>
> On Wed, Jun 1, 2016 at 10:05 AM, Gregory Orciuch <[hidden email]> wrote:
> Hi,
>
> I do have a trouble with one of tables which was named SET. Regardless the idiot in my company who wanted this name :/
>
> So we do have it defined in JPA2/Hibernate as below:
> @Table(schema = "media", name = "[set]")
> public class Set {...}
>
> (because it wants to work with MS SQL Server, where obviously SET is a reserved word).
> (changing name="set" causes hibernate not to find the table on MS SQL side).
>
> Then I do run same JPA entity in the integration tests with H2, and it is created with statement:
> Hibernate: create table media."set" (id integer....)
>
> At the end I want to load a dataset using DBUnit to this H2, so within dataset I do have
> <....>
> <MEDIA.set id="1" bla="ssss"/>
>
> However it fails to load because of exception:
> org.dbunit.dataset.NoSuchTableException: MEDIA.SET
>
> Currently I do not have an option to refactor table name. so it has to stay [set] in JPA entity.
>
> When I write a dataset like <MEDIA."set" ... it complains about the " character.
>
> Any idea how to load data in this crappy situation ?
>
> BR,
> Gregory
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Escape character in table dataset

Gregory Orciuch
Nope...
 <MEDIA.'set'

org.dbunit.dataset.DataSetException: Line 20814: Element type "MEDIA." must be followed by either attribute specifications, ">" or "/>".


2016-06-01 17:39 GMT+02:00 LAW Andy <[hidden email]>:
Single quotes rather than double?

MEDIA.’SET’ ??


> On 1 Jun 2016, at 16:35, Gregory Orciuch <[hidden email]> wrote:
>
> Nope becuase it does not escape the table name after dot. Looks like MEDIA.SET as whole is escaped not each part between dot.
>
> 1 cze 2016 17:33 "Jeff Jensen" <[hidden email]> napisał(a):
> Does escape pattern help you?  "Allows schema, table and column names escaping."
> http://dbunit.sourceforge.net/properties.html#escapepattern
>
>
> On Wed, Jun 1, 2016 at 10:23 AM, Gregory Orciuch <[hidden email]> wrote:
> and I cannot remove the MEDIA. , because the same retard as I mention at the begining named few tables same but have different schema (or catalog).
> I do have like MEDIA.TYPE  and PRODUCT.TYPE
>
> 2016-06-01 17:21 GMT+02:00 Gregory Orciuch <[hidden email]>:
> Yeap, Schema is correct, other MEDIA.* object are fine, means table created by JPA within H2 and data loaded from dbunit.
>
> 2016-06-01 17:17 GMT+02:00 Jeff Jensen <[hidden email]>:
> Is the schema set correctly for the test?  What happens (the errror or success) when removing "MEDIA." from the xml dataset?
>
>
> On Wed, Jun 1, 2016 at 10:05 AM, Gregory Orciuch <[hidden email]> wrote:
> Hi,
>
> I do have a trouble with one of tables which was named SET. Regardless the idiot in my company who wanted this name :/
>
> So we do have it defined in JPA2/Hibernate as below:
> @Table(schema = "media", name = "[set]")
> public class Set {...}
>
> (because it wants to work with MS SQL Server, where obviously SET is a reserved word).
> (changing name="set" causes hibernate not to find the table on MS SQL side).
>
> Then I do run same JPA entity in the integration tests with H2, and it is created with statement:
> Hibernate: create table media."set" (id integer....)
>
> At the end I want to load a dataset using DBUnit to this H2, so within dataset I do have
> <....>
> <MEDIA.set id="1" bla="ssss"/>
>
> However it fails to load because of exception:
> org.dbunit.dataset.NoSuchTableException: MEDIA.SET
>
> Currently I do not have an option to refactor table name. so it has to stay [set] in JPA entity.
>
> When I write a dataset like <MEDIA."set" ... it complains about the " character.
>
> Any idea how to load data in this crappy situation ?
>
> BR,
> Gregory
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Escape character in table dataset

Gregory Orciuch
Hi, anybody can help in this matter ? I'm stuck :/

2016-06-02 15:21 GMT+02:00 Gregory Orciuch <[hidden email]>:
Nope...
 <MEDIA.'set'

org.dbunit.dataset.DataSetException: Line 20814: Element type "MEDIA." must be followed by either attribute specifications, ">" or "/>".


2016-06-01 17:39 GMT+02:00 LAW Andy <[hidden email]>:
Single quotes rather than double?

MEDIA.’SET’ ??


> On 1 Jun 2016, at 16:35, Gregory Orciuch <[hidden email]> wrote:
>
> Nope becuase it does not escape the table name after dot. Looks like MEDIA.SET as whole is escaped not each part between dot.
>
> 1 cze 2016 17:33 "Jeff Jensen" <[hidden email]> napisał(a):
> Does escape pattern help you?  "Allows schema, table and column names escaping."
> http://dbunit.sourceforge.net/properties.html#escapepattern
>
>
> On Wed, Jun 1, 2016 at 10:23 AM, Gregory Orciuch <[hidden email]> wrote:
> and I cannot remove the MEDIA. , because the same retard as I mention at the begining named few tables same but have different schema (or catalog).
> I do have like MEDIA.TYPE  and PRODUCT.TYPE
>
> 2016-06-01 17:21 GMT+02:00 Gregory Orciuch <[hidden email]>:
> Yeap, Schema is correct, other MEDIA.* object are fine, means table created by JPA within H2 and data loaded from dbunit.
>
> 2016-06-01 17:17 GMT+02:00 Jeff Jensen <[hidden email]>:
> Is the schema set correctly for the test?  What happens (the errror or success) when removing "MEDIA." from the xml dataset?
>
>
> On Wed, Jun 1, 2016 at 10:05 AM, Gregory Orciuch <[hidden email]> wrote:
> Hi,
>
> I do have a trouble with one of tables which was named SET. Regardless the idiot in my company who wanted this name :/
>
> So we do have it defined in JPA2/Hibernate as below:
> @Table(schema = "media", name = "[set]")
> public class Set {...}
>
> (because it wants to work with MS SQL Server, where obviously SET is a reserved word).
> (changing name="set" causes hibernate not to find the table on MS SQL side).
>
> Then I do run same JPA entity in the integration tests with H2, and it is created with statement:
> Hibernate: create table media."set" (id integer....)
>
> At the end I want to load a dataset using DBUnit to this H2, so within dataset I do have
> <....>
> <MEDIA.set id="1" bla="ssss"/>
>
> However it fails to load because of exception:
> org.dbunit.dataset.NoSuchTableException: MEDIA.SET
>
> Currently I do not have an option to refactor table name. so it has to stay [set] in JPA entity.
>
> When I write a dataset like <MEDIA."set" ... it complains about the " character.
>
> Any idea how to load data in this crappy situation ?
>
> BR,
> Gregory
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user