Author Topic: t_object.Object_Type : strange behaviour  (Read 5133 times)

bITs.EA

  • EA User
  • **
  • Posts: 80
  • Karma: +2/-0
    • View Profile
t_object.Object_Type : strange behaviour
« on: December 06, 2013, 02:38:35 am »
Hi

When I query an object and show all columns of t_object, the object_type column seems to be filled with a normal text value (eg. StartEvent).

However when I try to query based on the object_type column, EA returns an empty recordset (but previously it showed many records with an object_type = 'StartEvent' so I'm sure they exist)

Code: [Select]
SELECT *
FROM t_object
WHERE object_type = 'StartEvent'

When I query with object_type LIKE '%Event%' I can see all events (IntermediateEvent, StartEvent, EndEvent), but with object_type LIKE '%Event%' I get an empty recordset again.

Could somebody explain what's "special" about this column? If I try the same with the stereotype column, it works fine...

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: t_object.Object_Type : strange behaviour
« Reply #1 on: December 06, 2013, 04:11:24 am »
How do you create a StartEvent? From which toolbox?

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: t_object.Object_Type : strange behaviour
« Reply #2 on: December 06, 2013, 09:07:07 am »
If you change the order of the fields so that Object_Type is first, EA won't 'massage' the value of the Object_Type field:

Code: [Select]
SELECT Object_Type,* FROM t_object
The Sparx Team
[email protected]

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13274
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: t_object.Object_Type : strange behaviour
« Reply #3 on: December 06, 2013, 06:03:30 pm »
Quote
If you change the order of the fields so that Object_Type is first, EA won't 'massage' the value of the Object_Type field:

Code: [Select]
SELECT Object_Type,* FROM t_object

Oh yeah, always fun when EA messes with your resultsets and/or queries  ::)

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: t_object.Object_Type : strange behaviour
« Reply #4 on: December 06, 2013, 09:20:55 pm »
I had tried with StateNode and that worked with no issue. So I'd asked about StartEvent in order to see whether that's different.

q.

bITs.EA

  • EA User
  • **
  • Posts: 80
  • Karma: +2/-0
    • View Profile
Re: t_object.Object_Type : strange behaviour
« Reply #5 on: December 07, 2013, 03:06:52 am »
I created the events from the BPMN 2.0 toolbox (and some from my own MDG).

I tried the SELECT Object_Type, * (like KP suggested), but the value is still the same.

EDIT: I executed an sql via an external script, so I could look at the raw data in the xml. It seems that EA messes up the object_type query result. The actual value is "Event" (no matter if it's start/intermediate/end), it's the stereotype column which logically specifies what kind of event it is.

Why does EA changes the values of query results???
« Last Edit: December 07, 2013, 03:23:49 am by bITs.EA »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: t_object.Object_Type : strange behaviour
« Reply #6 on: December 08, 2013, 10:22:37 am »
It's probably because of the metatype. EA does some more "magic" with the query (I currently can't recall what that was, but there something). Does not seem to be very orthogonal. But that's what we already know from EA.

q.