Completed
Pull Request — master (#288)
by
unknown
03:49
created

GamecurrencyTableMap::getPrimaryKeyHashFromRow()   B

Complexity

Conditions 11
Paths 33

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 7.0499
c 0
b 0
f 0
cc 11
eloc 4
nc 33
nop 3

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 29 and the first side effect is on line 465.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
3
namespace eXpansion\Framework\PlayersBundle\Model\Map;
4
5
use Propel\Runtime\Propel;
6
use Propel\Runtime\ActiveQuery\Criteria;
7
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
8
use Propel\Runtime\Connection\ConnectionInterface;
9
use Propel\Runtime\DataFetcher\DataFetcherInterface;
10
use Propel\Runtime\Exception\PropelException;
11
use Propel\Runtime\Map\RelationMap;
12
use Propel\Runtime\Map\TableMap;
13
use Propel\Runtime\Map\TableMapTrait;
14
use eXpansion\Framework\PlayersBundle\Model\Gamecurrency;
15
use eXpansion\Framework\PlayersBundle\Model\GamecurrencyQuery;
16
17
18
/**
19
 * This class defines the structure of the 'gamecurrency' table.
20
 *
21
 *
22
 *
23
 * This map class is used by Propel to do runtime db structure discovery.
24
 * For example, the createSelectSql() method checks the type of a given column used in an
25
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
26
 * (i.e. if it's a text column type).
27
 *
28
 */
29
class GamecurrencyTableMap extends TableMap
30
{
31
    use InstancePoolTrait;
32
    use TableMapTrait;
33
34
    /**
35
     * The (dot-path) name of this class
36
     */
37
    const CLASS_NAME = 'eXpansion.Framework.PlayersBundle.Model.Map.GamecurrencyTableMap';
38
39
    /**
40
     * The default database name for this class
41
     */
42
    const DATABASE_NAME = 'expansion';
43
44
    /**
45
     * The table name for this class
46
     */
47
    const TABLE_NAME = 'gamecurrency';
48
49
    /**
50
     * The related Propel class for this table
51
     */
52
    const OM_CLASS = '\\eXpansion\\Framework\\PlayersBundle\\Model\\Gamecurrency';
53
54
    /**
55
     * A class that can be returned by this tableMap
56
     */
57
    const CLASS_DEFAULT = 'eXpansion.Framework.PlayersBundle.Model.Gamecurrency';
58
59
    /**
60
     * The total number of columns
61
     */
62
    const NUM_COLUMNS = 9;
63
64
    /**
65
     * The number of lazy-loaded columns
66
     */
67
    const NUM_LAZY_LOAD_COLUMNS = 0;
68
69
    /**
70
     * The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
71
     */
72
    const NUM_HYDRATE_COLUMNS = 9;
73
74
    /**
75
     * the column name for the id field
76
     */
77
    const COL_ID = 'gamecurrency.id';
78
79
    /**
80
     * the column name for the senderLogin field
81
     */
82
    const COL_SENDERLOGIN = 'gamecurrency.senderLogin';
83
84
    /**
85
     * the column name for the receiverLogin field
86
     */
87
    const COL_RECEIVERLOGIN = 'gamecurrency.receiverLogin';
88
89
    /**
90
     * the column name for the transactionId field
91
     */
92
    const COL_TRANSACTIONID = 'gamecurrency.transactionId';
93
94
    /**
95
     * the column name for the billId field
96
     */
97
    const COL_BILLID = 'gamecurrency.billId';
98
99
    /**
100
     * the column name for the amount field
101
     */
102
    const COL_AMOUNT = 'gamecurrency.amount';
103
104
    /**
105
     * the column name for the message field
106
     */
107
    const COL_MESSAGE = 'gamecurrency.message';
108
109
    /**
110
     * the column name for the status field
111
     */
112
    const COL_STATUS = 'gamecurrency.status';
113
114
    /**
115
     * the column name for the datetime field
116
     */
117
    const COL_DATETIME = 'gamecurrency.datetime';
118
119
    /**
120
     * The default string format for model objects of the related table
121
     */
122
    const DEFAULT_STRING_FORMAT = 'YAML';
123
124
    /**
125
     * holds an array of fieldnames
126
     *
127
     * first dimension keys are the type constants
128
     * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
129
     */
130
    protected static $fieldNames = array (
131
        self::TYPE_PHPNAME       => array('Id', 'Senderlogin', 'Receiverlogin', 'Transactionid', 'Billid', 'Amount', 'Message', 'Status', 'Datetime', ),
132
        self::TYPE_CAMELNAME     => array('id', 'senderlogin', 'receiverlogin', 'transactionid', 'billid', 'amount', 'message', 'status', 'datetime', ),
133
        self::TYPE_COLNAME       => array(GamecurrencyTableMap::COL_ID, GamecurrencyTableMap::COL_SENDERLOGIN, GamecurrencyTableMap::COL_RECEIVERLOGIN, GamecurrencyTableMap::COL_TRANSACTIONID, GamecurrencyTableMap::COL_BILLID, GamecurrencyTableMap::COL_AMOUNT, GamecurrencyTableMap::COL_MESSAGE, GamecurrencyTableMap::COL_STATUS, GamecurrencyTableMap::COL_DATETIME, ),
134
        self::TYPE_FIELDNAME     => array('id', 'senderLogin', 'receiverLogin', 'transactionId', 'billId', 'amount', 'message', 'status', 'datetime', ),
135
        self::TYPE_NUM           => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
136
    );
137
138
    /**
139
     * holds an array of keys for quick access to the fieldnames array
140
     *
141
     * first dimension keys are the type constants
142
     * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
143
     */
144
    protected static $fieldKeys = array (
145
        self::TYPE_PHPNAME       => array('Id' => 0, 'Senderlogin' => 1, 'Receiverlogin' => 2, 'Transactionid' => 3, 'Billid' => 4, 'Amount' => 5, 'Message' => 6, 'Status' => 7, 'Datetime' => 8, ),
146
        self::TYPE_CAMELNAME     => array('id' => 0, 'senderlogin' => 1, 'receiverlogin' => 2, 'transactionid' => 3, 'billid' => 4, 'amount' => 5, 'message' => 6, 'status' => 7, 'datetime' => 8, ),
147
        self::TYPE_COLNAME       => array(GamecurrencyTableMap::COL_ID => 0, GamecurrencyTableMap::COL_SENDERLOGIN => 1, GamecurrencyTableMap::COL_RECEIVERLOGIN => 2, GamecurrencyTableMap::COL_TRANSACTIONID => 3, GamecurrencyTableMap::COL_BILLID => 4, GamecurrencyTableMap::COL_AMOUNT => 5, GamecurrencyTableMap::COL_MESSAGE => 6, GamecurrencyTableMap::COL_STATUS => 7, GamecurrencyTableMap::COL_DATETIME => 8, ),
148
        self::TYPE_FIELDNAME     => array('id' => 0, 'senderLogin' => 1, 'receiverLogin' => 2, 'transactionId' => 3, 'billId' => 4, 'amount' => 5, 'message' => 6, 'status' => 7, 'datetime' => 8, ),
149
        self::TYPE_NUM           => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
150
    );
151
152
    /**
153
     * Initialize the table attributes and columns
154
     * Relations are not initialized by this method since they are lazy loaded
155
     *
156
     * @return void
157
     * @throws PropelException
158
     */
159
    public function initialize()
160
    {
161
        // attributes
162
        $this->setName('gamecurrency');
163
        $this->setPhpName('Gamecurrency');
164
        $this->setIdentifierQuoting(false);
165
        $this->setClassName('\\eXpansion\\Framework\\PlayersBundle\\Model\\Gamecurrency');
166
        $this->setPackage('eXpansion.Framework.PlayersBundle.Model');
167
        $this->setUseIdGenerator(true);
168
        // columns
169
        $this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
170
        $this->addColumn('senderLogin', 'Senderlogin', 'VARCHAR', false, 255, null);
171
        $this->getColumn('senderLogin')->setPrimaryString(true);
172
        $this->addColumn('receiverLogin', 'Receiverlogin', 'VARCHAR', false, 255, null);
173
        $this->addColumn('transactionId', 'Transactionid', 'INTEGER', false, null, null);
174
        $this->addColumn('billId', 'Billid', 'INTEGER', false, null, null);
175
        $this->addColumn('amount', 'Amount', 'INTEGER', false, null, null);
176
        $this->addColumn('message', 'Message', 'VARCHAR', false, 255, null);
177
        $this->addColumn('status', 'Status', 'INTEGER', false, null, null);
178
        $this->addColumn('datetime', 'Datetime', 'TIMESTAMP', false, null, null);
179
    } // initialize()
180
181
    /**
182
     * Build the RelationMap objects for this table relationships
183
     */
184
    public function buildRelations()
185
    {
186
    } // buildRelations()
187
188
    /**
189
     * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
190
     *
191
     * For tables with a single-column primary key, that simple pkey value will be returned.  For tables with
192
     * a multi-column primary key, a serialize()d version of the primary key will be returned.
193
     *
194
     * @param array  $row       resultset row.
195
     * @param int    $offset    The 0-based offset for reading from the resultset row.
196
     * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
197
     *                           TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
198
     *
199
     * @return string The primary key hash of the row
200
     */
201
    public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
202
    {
203
        // If the PK cannot be derived from the row, return NULL.
204
        if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
205
            return null;
206
        }
207
208
        return null === $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] || is_scalar($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]) || is_callable([$row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], '__toString']) ? (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] : $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
209
    }
210
211
    /**
212
     * Retrieves the primary key from the DB resultset row
213
     * For tables with a single-column primary key, that simple pkey value will be returned.  For tables with
214
     * a multi-column primary key, an array of the primary key columns will be returned.
215
     *
216
     * @param array  $row       resultset row.
217
     * @param int    $offset    The 0-based offset for reading from the resultset row.
218
     * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
219
     *                           TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
220
     *
221
     * @return mixed The primary key of the row
222
     */
223
    public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
224
    {
225
        return (int) $row[
226
            $indexType == TableMap::TYPE_NUM
227
                ? 0 + $offset
228
                : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
229
        ];
230
    }
231
232
    /**
233
     * The class that the tableMap will make instances of.
234
     *
235
     * If $withPrefix is true, the returned path
236
     * uses a dot-path notation which is translated into a path
237
     * relative to a location on the PHP include_path.
238
     * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
239
     *
240
     * @param boolean $withPrefix Whether or not to return the path with the class name
241
     * @return string path.to.ClassName
242
     */
243
    public static function getOMClass($withPrefix = true)
244
    {
245
        return $withPrefix ? GamecurrencyTableMap::CLASS_DEFAULT : GamecurrencyTableMap::OM_CLASS;
246
    }
247
248
    /**
249
     * Populates an object of the default type or an object that inherit from the default.
250
     *
251
     * @param array  $row       row returned by DataFetcher->fetch().
252
     * @param int    $offset    The 0-based offset for reading from the resultset row.
253
     * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
254
                                 One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME
255
     *                           TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
256
     *
257
     * @throws PropelException Any exceptions caught during processing will be
258
     *                         rethrown wrapped into a PropelException.
259
     * @return array           (Gamecurrency object, last column rank)
260
     */
261
    public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
262
    {
263
        $key = GamecurrencyTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
264
        if (null !== ($obj = GamecurrencyTableMap::getInstanceFromPool($key))) {
265
            // We no longer rehydrate the object, since this can cause data loss.
266
            // See http://www.propelorm.org/ticket/509
267
            // $obj->hydrate($row, $offset, true); // rehydrate
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
268
            $col = $offset + GamecurrencyTableMap::NUM_HYDRATE_COLUMNS;
269
        } else {
270
            $cls = GamecurrencyTableMap::OM_CLASS;
271
            /** @var Gamecurrency $obj */
272
            $obj = new $cls();
273
            $col = $obj->hydrate($row, $offset, false, $indexType);
274
            GamecurrencyTableMap::addInstanceToPool($obj, $key);
275
        }
276
277
        return array($obj, $col);
278
    }
279
280
    /**
281
     * The returned array will contain objects of the default type or
282
     * objects that inherit from the default.
283
     *
284
     * @param DataFetcherInterface $dataFetcher
285
     * @return array
286
     * @throws PropelException Any exceptions caught during processing will be
287
     *                         rethrown wrapped into a PropelException.
288
     */
289
    public static function populateObjects(DataFetcherInterface $dataFetcher)
290
    {
291
        $results = array();
292
293
        // set the class once to avoid overhead in the loop
294
        $cls = static::getOMClass(false);
295
        // populate the object(s)
296
        while ($row = $dataFetcher->fetch()) {
297
            $key = GamecurrencyTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
298
            if (null !== ($obj = GamecurrencyTableMap::getInstanceFromPool($key))) {
299
                // We no longer rehydrate the object, since this can cause data loss.
300
                // See http://www.propelorm.org/ticket/509
301
                // $obj->hydrate($row, 0, true); // rehydrate
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
302
                $results[] = $obj;
303
            } else {
304
                /** @var Gamecurrency $obj */
305
                $obj = new $cls();
306
                $obj->hydrate($row);
307
                $results[] = $obj;
308
                GamecurrencyTableMap::addInstanceToPool($obj, $key);
309
            } // if key exists
310
        }
311
312
        return $results;
313
    }
314
    /**
315
     * Add all the columns needed to create a new object.
316
     *
317
     * Note: any columns that were marked with lazyLoad="true" in the
318
     * XML schema will not be added to the select list and only loaded
319
     * on demand.
320
     *
321
     * @param Criteria $criteria object containing the columns to add.
322
     * @param string   $alias    optional table alias
323
     * @throws PropelException Any exceptions caught during processing will be
324
     *                         rethrown wrapped into a PropelException.
325
     */
326
    public static function addSelectColumns(Criteria $criteria, $alias = null)
327
    {
328
        if (null === $alias) {
329
            $criteria->addSelectColumn(GamecurrencyTableMap::COL_ID);
330
            $criteria->addSelectColumn(GamecurrencyTableMap::COL_SENDERLOGIN);
331
            $criteria->addSelectColumn(GamecurrencyTableMap::COL_RECEIVERLOGIN);
332
            $criteria->addSelectColumn(GamecurrencyTableMap::COL_TRANSACTIONID);
333
            $criteria->addSelectColumn(GamecurrencyTableMap::COL_BILLID);
334
            $criteria->addSelectColumn(GamecurrencyTableMap::COL_AMOUNT);
335
            $criteria->addSelectColumn(GamecurrencyTableMap::COL_MESSAGE);
336
            $criteria->addSelectColumn(GamecurrencyTableMap::COL_STATUS);
337
            $criteria->addSelectColumn(GamecurrencyTableMap::COL_DATETIME);
338
        } else {
339
            $criteria->addSelectColumn($alias . '.id');
340
            $criteria->addSelectColumn($alias . '.senderLogin');
341
            $criteria->addSelectColumn($alias . '.receiverLogin');
342
            $criteria->addSelectColumn($alias . '.transactionId');
343
            $criteria->addSelectColumn($alias . '.billId');
344
            $criteria->addSelectColumn($alias . '.amount');
345
            $criteria->addSelectColumn($alias . '.message');
346
            $criteria->addSelectColumn($alias . '.status');
347
            $criteria->addSelectColumn($alias . '.datetime');
348
        }
349
    }
350
351
    /**
352
     * Returns the TableMap related to this object.
353
     * This method is not needed for general use but a specific application could have a need.
354
     * @return TableMap
355
     * @throws PropelException Any exceptions caught during processing will be
356
     *                         rethrown wrapped into a PropelException.
357
     */
358
    public static function getTableMap()
359
    {
360
        return Propel::getServiceContainer()->getDatabaseMap(GamecurrencyTableMap::DATABASE_NAME)->getTable(GamecurrencyTableMap::TABLE_NAME);
361
    }
362
363
    /**
364
     * Add a TableMap instance to the database for this tableMap class.
365
     */
366
    public static function buildTableMap()
367
    {
368
        $dbMap = Propel::getServiceContainer()->getDatabaseMap(GamecurrencyTableMap::DATABASE_NAME);
369
        if (!$dbMap->hasTable(GamecurrencyTableMap::TABLE_NAME)) {
370
            $dbMap->addTableObject(new GamecurrencyTableMap());
371
        }
372
    }
373
374
    /**
375
     * Performs a DELETE on the database, given a Gamecurrency or Criteria object OR a primary key value.
376
     *
377
     * @param mixed               $values Criteria or Gamecurrency object or primary key or array of primary keys
378
     *              which is used to create the DELETE statement
379
     * @param  ConnectionInterface $con the connection to use
380
     * @return int             The number of affected rows (if supported by underlying database driver).  This includes CASCADE-related rows
381
     *                         if supported by native driver or if emulated using Propel.
382
     * @throws PropelException Any exceptions caught during processing will be
383
     *                         rethrown wrapped into a PropelException.
384
     */
385
     public static function doDelete($values, ConnectionInterface $con = null)
386
     {
387
        if (null === $con) {
388
            $con = Propel::getServiceContainer()->getWriteConnection(GamecurrencyTableMap::DATABASE_NAME);
389
        }
390
391
        if ($values instanceof Criteria) {
392
            // rename for clarity
393
            $criteria = $values;
394
        } elseif ($values instanceof \eXpansion\Framework\PlayersBundle\Model\Gamecurrency) { // it's a model object
395
            // create criteria based on pk values
396
            $criteria = $values->buildPkeyCriteria();
397
        } else { // it's a primary key, or an array of pks
398
            $criteria = new Criteria(GamecurrencyTableMap::DATABASE_NAME);
399
            $criteria->add(GamecurrencyTableMap::COL_ID, (array) $values, Criteria::IN);
400
        }
401
402
        $query = GamecurrencyQuery::create()->mergeWith($criteria);
403
404
        if ($values instanceof Criteria) {
405
            GamecurrencyTableMap::clearInstancePool();
406
        } elseif (!is_object($values)) { // it's a primary key, or an array of pks
407
            foreach ((array) $values as $singleval) {
408
                GamecurrencyTableMap::removeInstanceFromPool($singleval);
409
            }
410
        }
411
412
        return $query->delete($con);
413
    }
414
415
    /**
416
     * Deletes all rows from the gamecurrency table.
417
     *
418
     * @param ConnectionInterface $con the connection to use
419
     * @return int The number of affected rows (if supported by underlying database driver).
420
     */
421
    public static function doDeleteAll(ConnectionInterface $con = null)
422
    {
423
        return GamecurrencyQuery::create()->doDeleteAll($con);
424
    }
425
426
    /**
427
     * Performs an INSERT on the database, given a Gamecurrency or Criteria object.
428
     *
429
     * @param mixed               $criteria Criteria or Gamecurrency object containing data that is used to create the INSERT statement.
430
     * @param ConnectionInterface $con the ConnectionInterface connection to use
431
     * @return mixed           The new primary key.
432
     * @throws PropelException Any exceptions caught during processing will be
433
     *                         rethrown wrapped into a PropelException.
434
     */
435
    public static function doInsert($criteria, ConnectionInterface $con = null)
436
    {
437
        if (null === $con) {
438
            $con = Propel::getServiceContainer()->getWriteConnection(GamecurrencyTableMap::DATABASE_NAME);
439
        }
440
441
        if ($criteria instanceof Criteria) {
442
            $criteria = clone $criteria; // rename for clarity
443
        } else {
444
            $criteria = $criteria->buildCriteria(); // build Criteria from Gamecurrency object
445
        }
446
447
        if ($criteria->containsKey(GamecurrencyTableMap::COL_ID) && $criteria->keyContainsValue(GamecurrencyTableMap::COL_ID) ) {
448
            throw new PropelException('Cannot insert a value for auto-increment primary key ('.GamecurrencyTableMap::COL_ID.')');
449
        }
450
451
452
        // Set the correct dbName
453
        $query = GamecurrencyQuery::create()->mergeWith($criteria);
454
455
        // use transaction because $criteria could contain info
456
        // for more than one table (I guess, conceivably)
457
        return $con->transaction(function () use ($con, $query) {
458
            return $query->doInsert($con);
459
        });
460
    }
461
462
} // GamecurrencyTableMap
463
// This is the static code needed to register the TableMap for this table with the main Propel class.
464
//
465
GamecurrencyTableMap::buildTableMap();
466